diff --git a/src/node.cc b/src/node.cc index acaab53c133661..3597571cdffd4c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1488,8 +1488,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! @@ -1504,7 +1504,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;