Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: refactor deprecated v8::Function::Call call #23804

Merged
merged 1 commit into from
Oct 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<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;
Expand All @@ -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()) {
targos marked this conversation as resolved.
Show resolved Hide resolved
ReportException(env, error, message);

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