@@ -954,7 +954,7 @@ void TriggerUncaughtException(Isolate* isolate, |
954 | 954 | return; |
955 | 955 | } |
956 | 956 |
|
957 | | - MaybeLocal<Value> handled; |
| 957 | + MaybeLocal<Value> maybe_handled; |
958 | 958 | if (env->can_call_into_js()) { |
959 | 959 | // We do not expect the global uncaught exception itself to throw any more |
960 | 960 | // exceptions. If it does, exit the current Node.js instance. |
@@ -968,15 +968,16 @@ void TriggerUncaughtException(Isolate* isolate, |
968 | 968 | Local<Value> argv[2] = { error, |
969 | 969 | Boolean::New(env->isolate(), from_promise) }; |
970 | 970 |
|
971 | | - handled = fatal_exception_function.As<Function>()->Call( |
| 971 | + maybe_handled = fatal_exception_function.As<Function>()->Call( |
972 | 972 | env->context(), process_object, arraysize(argv), argv); |
973 | 973 | } |
974 | 974 |
|
975 | 975 | // If process._fatalException() throws, we are now exiting the Node.js |
976 | 976 | // instance so return to continue the exit routine. |
977 | 977 | // TODO(joyeecheung): return a Maybe here to prevent the caller from |
978 | 978 | // stepping on the exit. |
979 | | - if (handled.IsEmpty()) { |
| 979 | + Local<Value> handled; |
| 980 | + if (!maybe_handled.ToLocal(&handled)) { |
980 | 981 | return; |
981 | 982 | } |
982 | 983 |
|
@@ -986,7 +987,7 @@ void TriggerUncaughtException(Isolate* isolate, |
986 | 987 | // TODO(joyeecheung): This has been only checking that the return value is |
987 | 988 | // exactly false. Investigate whether this can be turned to an "if true" |
988 | 989 | // similar to how the worker global uncaught exception handler handles it. |
989 | | - if (!handled.ToLocalChecked()->IsFalse()) { |
| 990 | + if (!handled->IsFalse()) { |
990 | 991 | return; |
991 | 992 | } |
992 | 993 |
|
|