mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: refactor deprecated v8::Function::Call call
Refs: https://github.com/nodejs/node/pull/23414#issuecomment-428815506 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
1bed1107c7
commit
17db407ba2
1 file changed
+3
-4
+3
-4
@@ -1384,9 +1384,8 @@ void FatalException(Isolate* isolate,
|
||||
fatal_try_catch.SetVerbose(false);
|
||||
|
||||
// This will return true if the JS layer handled it, false otherwise
|
||||
Local<Value> caught =
|
||||
fatal_exception_function.As<Function>()
|
||||
->Call(process_object, 1, &error);
|
||||
MaybeLocal<Value> caught = fatal_exception_function.As<Function>()->Call(
|
||||
env->context(), process_object, 1, &error);
|
||||
|
||||
if (fatal_try_catch.HasTerminated())
|
||||
return;
|
||||
@@ -1395,7 +1394,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 ->
|
||||
|
||||
Reference in new issue
Block a user