Skip to content

Commit

Permalink
src: fix ToObject() usage in exceptions.cc
Browse files Browse the repository at this point in the history
PR-URL: #23314
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
cjihrig authored and jasnell committed Oct 17, 2018
1 parent 15b1241 commit 5d69627
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/exceptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ Local<Value> UVException(Isolate* isolate,
String::Concat(isolate, js_msg, FIXED_ONE_BYTE_STRING(isolate, "'"));
}

Local<Object> e = Exception::Error(js_msg)->ToObject(isolate);
Local<Object> 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);
Expand Down

0 comments on commit 5d69627

Please sign in to comment.