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 targos committed Oct 10, 2018
1 parent c4aa033 commit 5228ec4
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 @@ -137,7 +137,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 5228ec4

Please sign in to comment.