Skip to content

Commit 59d2bd9

Browse files
committed
src: fix ToObject() usage in exceptions.cc
PR-URL: nodejs#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 a8530bc commit 59d2bd9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/exceptions.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ Local<Value> UVException(Isolate* isolate,
128128
String::Concat(isolate, js_msg, FIXED_ONE_BYTE_STRING(isolate, "'"));
129129
}
130130

131-
Local<Object> e = Exception::Error(js_msg)->ToObject(isolate);
131+
Local<Object> e =
132+
Exception::Error(js_msg)->ToObject(isolate->GetCurrentContext())
133+
.ToLocalChecked();
132134

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

0 commit comments

Comments
 (0)