summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Lanz <romain.lanz@slynova.ch>2018-10-21 18:25:01 +0200
committerRefael Ackermann <refack@gmail.com>2018-10-23 16:33:27 -0400
commit341006b144d18c15e1b026ea0aa5044c07436f87 (patch)
treeea4671dda3b3a5073d27045bfce7495774aeb4c0
parent4194b051e8271efc2f778d02cd8dec7030fb2a68 (diff)
downloadandroid-node-v8-341006b144d18c15e1b026ea0aa5044c07436f87.tar.gz
android-node-v8-341006b144d18c15e1b026ea0aa5044c07436f87.tar.bz2
android-node-v8-341006b144d18c15e1b026ea0aa5044c07436f87.zip
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>
-rw-r--r--src/node.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node.cc b/src/node.cc
index 02d9765301..a71ae26ef6 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<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;
@@ -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 ->