mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
src: fix ToObject() usage in node_crypto.cc
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
b2d3445644
commit
315bf257e5
1 file changed
+2
-1
+2
-1
@@ -2164,7 +2164,8 @@ void SSLWrap<Base>::VerifyError(const FunctionCallbackInfo<Value>& args) {
|
||||
Isolate* isolate = args.GetIsolate();
|
||||
Local<String> reason_string = OneByteString(isolate, reason);
|
||||
Local<Value> exception_value = Exception::Error(reason_string);
|
||||
Local<Object> exception_object = exception_value->ToObject(isolate);
|
||||
Local<Object> exception_object =
|
||||
exception_value->ToObject(isolate->GetCurrentContext()).ToLocalChecked();
|
||||
exception_object->Set(w->env()->context(), w->env()->code_string(),
|
||||
OneByteString(isolate, code)).FromJust();
|
||||
args.GetReturnValue().Set(exception_object);
|
||||
|
||||
Reference in new issue
Block a user