diff --git a/src/node.cc b/src/node.cc index 02d9765301aebc..a71ae26ef6ff0a 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1381,9 +1381,8 @@ void FatalException(Isolate* isolate, fatal_try_catch.SetVerbose(false); // This will return true if the JS layer handled it, false otherwise - Local caught = - fatal_exception_function.As() - ->Call(process_object, 1, &error); + MaybeLocal caught = fatal_exception_function.As()->Call( + env->context(), process_object, 1, &error); if (fatal_try_catch.HasTerminated()) return; @@ -1392,7 +1391,7 @@ void FatalException(Isolate* isolate, // The fatal exception function threw, so we must exit ReportException(env, fatal_try_catch); exit(7); - } else if (caught->IsFalse()) { + } else if (caught.ToLocalChecked()->IsFalse()) { ReportException(env, error, message); // fatal_exception_function call before may have set a new exit code ->