Skip to content

Commit 5228ec4

Browse files
cjihrigtargos
authored andcommitted
src: fix ToObject() usage in exceptions.cc
PR-URL: #23314 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent c4aa033 commit 5228ec4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/exceptions.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ Local<Value> UVException(Isolate* isolate,
137137
String::Concat(isolate, js_msg, FIXED_ONE_BYTE_STRING(isolate, "'"));
138138
}
139139

140-
Local<Object> e = Exception::Error(js_msg)->ToObject(isolate);
140+
Local<Object> e =
141+
Exception::Error(js_msg)->ToObject(isolate->GetCurrentContext())
142+
.ToLocalChecked();
141143

142144
e->Set(env->errno_string(), Integer::New(isolate, errorno));
143145
e->Set(env->code_string(), js_code);

0 commit comments

Comments
 (0)