Skip to content

Commit 315bf25

Browse files
cjihrigtargos
authored andcommitted
src: fix ToObject() usage in node_crypto.cc
PR-URL: #23298 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b2d3445 commit 315bf25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_crypto.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -2164,7 +2164,8 @@ void SSLWrap<Base>::VerifyError(const FunctionCallbackInfo<Value>& args) {
21642164
Isolate* isolate = args.GetIsolate();
21652165
Local<String> reason_string = OneByteString(isolate, reason);
21662166
Local<Value> exception_value = Exception::Error(reason_string);
2167-
Local<Object> exception_object = exception_value->ToObject(isolate);
2167+
Local<Object> exception_object =
2168+
exception_value->ToObject(isolate->GetCurrentContext()).ToLocalChecked();
21682169
exception_object->Set(w->env()->context(), w->env()->code_string(),
21692170
OneByteString(isolate, code)).FromJust();
21702171
args.GetReturnValue().Set(exception_object);

0 commit comments

Comments
 (0)