From 6924d3dcb91e11fc5cfd03d2c80037f1d30bbbdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 2 Sep 2018 15:08:15 +0200 Subject: [PATCH] src: fix node::FatalException PR-URL: https://github.com/nodejs/node/pull/22654 Reviewed-By: Ruben Bridgewater Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Denys Otrishko --- src/node.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/node.cc b/src/node.cc index 2a51e046e03..c0883bfaa32 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1484,8 +1484,8 @@ void FatalException(Isolate* isolate, Environment* env = Environment::GetCurrent(isolate); Local process_object = env->process_object(); Local fatal_exception_string = env->fatal_exception_string(); - Local fatal_exception_function = - process_object->Get(fatal_exception_string).As(); + Local fatal_exception_function = + process_object->Get(fatal_exception_string); if (!fatal_exception_function->IsFunction()) { // Failed before the process._fatalException function was added! @@ -1500,7 +1500,8 @@ void FatalException(Isolate* isolate, // This will return true if the JS layer handled it, false otherwise Local caught = - fatal_exception_function->Call(process_object, 1, &error); + fatal_exception_function.As() + ->Call(process_object, 1, &error); if (fatal_try_catch.HasTerminated()) return;