From 43a1bc30c1e14953e8570d99e91b1a1192712cc4 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 6 Oct 2018 16:46:20 -0400 Subject: [PATCH] src: fix ToObject() usage in node_crypto.cc PR-URL: https://github.com/nodejs/node/pull/23298 Reviewed-By: Anna Henningsen Reviewed-By: Joyee Cheung Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- src/node_crypto.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 4cccc6eb7a4772..2e3280f313db3a 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2168,7 +2168,8 @@ void SSLWrap::VerifyError(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); Local reason_string = OneByteString(isolate, reason); Local exception_value = Exception::Error(reason_string); - Local exception_object = exception_value->ToObject(isolate); + Local 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);