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:
parent
787cbe9abe
commit
43a1bc30c1
@ -2168,7 +2168,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user