Skip to content

Commit df05ddf

Browse files
RomainLanztargos
authored andcommitted
src: refactor deprecated v8::Function::Call call
Refs: #23414 (comment) PR-URL: #23804 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ab58439 commit df05ddf

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
@@ -1381,9 +1381,8 @@ void FatalException(Isolate* isolate,
13811381
fatal_try_catch.SetVerbose(false);
13821382

13831383
// This will return true if the JS layer handled it, false otherwise
1384-
Local<Value> caught =
1385-
fatal_exception_function.As<Function>()
1386-
->Call(process_object, 1, &error);
1384+
MaybeLocal<Value> caught = fatal_exception_function.As<Function>()->Call(
1385+
env->context(), process_object, 1, &error);
13871386

13881387
if (fatal_try_catch.HasTerminated())
13891388
return;
@@ -1392,7 +1391,7 @@ void FatalException(Isolate* isolate,
13921391
// The fatal exception function threw, so we must exit
13931392
ReportException(env, fatal_try_catch);
13941393
exit(7);
1395-
} else if (caught->IsFalse()) {
1394+
} else if (caught.ToLocalChecked()->IsFalse()) {
13961395
ReportException(env, error, message);
13971396

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

0 commit comments

Comments
 (0)