From 5228ec4410605651192137890da5c41ac5755bcc Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 7 Oct 2018 10:05:30 -0400 Subject: [PATCH] src: fix ToObject() usage in exceptions.cc PR-URL: https://github.com/nodejs/node/pull/23314 Reviewed-By: Anna Henningsen Reviewed-By: Daniel Bevenius Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani --- src/exceptions.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/exceptions.cc b/src/exceptions.cc index d1c0794e82fde4..5924701208a311 100644 --- a/src/exceptions.cc +++ b/src/exceptions.cc @@ -137,7 +137,9 @@ Local UVException(Isolate* isolate, String::Concat(isolate, js_msg, FIXED_ONE_BYTE_STRING(isolate, "'")); } - Local e = Exception::Error(js_msg)->ToObject(isolate); + Local e = + Exception::Error(js_msg)->ToObject(isolate->GetCurrentContext()) + .ToLocalChecked(); e->Set(env->errno_string(), Integer::New(isolate, errorno)); e->Set(env->code_string(), js_code);