diff --git a/src/node.cc b/src/node.cc index 25dc8d2bbef6ee..91d2033bd414ca 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1485,8 +1485,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! @@ -1501,7 +1501,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;