Skip to content

Commit 43a1bc3

Browse files
committed
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 787cbe9 commit 43a1bc3

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)