Skip to content

Commit 9c4c74a

Browse files
cjihrigjasnell
authored andcommitted
src: fix ToObject() usage in node_crypto.cc
PR-URL: #23298 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b48b1e5 commit 9c4c74a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_crypto.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2168,7 +2168,8 @@ void SSLWrap<Base>::VerifyError(const FunctionCallbackInfo<Value>& args) {
21682168
Isolate* isolate = args.GetIsolate();
21692169
Local<String> reason_string = OneByteString(isolate, reason);
21702170
Local<Value> exception_value = Exception::Error(reason_string);
2171-
Local<Object> exception_object = exception_value->ToObject(isolate);
2171+
Local<Object> exception_object =
2172+
exception_value->ToObject(isolate->GetCurrentContext()).ToLocalChecked();
21722173
exception_object->Set(w->env()->context(), w->env()->code_string(),
21732174
OneByteString(isolate, code)).FromJust();
21742175
args.GetReturnValue().Set(exception_object);

0 commit comments

Comments
 (0)