Skip to content

Commit 17db407

Browse files
RomainLanzMylesBorins
authored andcommitted
src: refactor deprecated v8::Function::Call call
Refs: #23414 (comment) PR-URL: #23804 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 1bed110 commit 17db407

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/node.cc

+3-4
Original file line numberDiff line numberDiff line change
@@ -1384,9 +1384,8 @@ void FatalException(Isolate* isolate,
13841384
fatal_try_catch.SetVerbose(false);
13851385

13861386
// This will return true if the JS layer handled it, false otherwise
1387-
Local<Value> caught =
1388-
fatal_exception_function.As<Function>()
1389-
->Call(process_object, 1, &error);
1387+
MaybeLocal<Value> caught = fatal_exception_function.As<Function>()->Call(
1388+
env->context(), process_object, 1, &error);
13901389

13911390
if (fatal_try_catch.HasTerminated())
13921391
return;
@@ -1395,7 +1394,7 @@ void FatalException(Isolate* isolate,
13951394
// The fatal exception function threw, so we must exit
13961395
ReportException(env, fatal_try_catch);
13971396
exit(7);
1398-
} else if (caught->IsFalse()) {
1397+
} else if (caught.ToLocalChecked()->IsFalse()) {
13991398
ReportException(env, error, message);
14001399

14011400
// fatal_exception_function call before may have set a new exit code ->

0 commit comments

Comments
 (0)