| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -945,7 +945,7 @@ void TriggerUncaughtException(Isolate* isolate, | |||
| 945 | 945 | return; | |
| 946 | 946 | } | |
| 947 | 947 | ||
| 948 | - MaybeLocal<Value> handled; | ||
| 948 | + MaybeLocal<Value> maybe_handled; | ||
| 949 | 949 | if (env->can_call_into_js()) { | |
| 950 | 950 | // We do not expect the global uncaught exception itself to throw any more | |
| 951 | 951 | // exceptions. If it does, exit the current Node.js instance. | |
@@ -959,15 +959,16 @@ void TriggerUncaughtException(Isolate* isolate, | |||
| 959 | 959 | Local<Value> argv[2] = { error, | |
| 960 | 960 | Boolean::New(env->isolate(), from_promise) }; | |
| 961 | 961 | ||
| 962 | - handled = fatal_exception_function.As<Function>()->Call( | ||
| 962 | + maybe_handled = fatal_exception_function.As<Function>()->Call( | ||
| 963 | 963 | env->context(), process_object, arraysize(argv), argv); | |
| 964 | 964 | } | |
| 965 | 965 | ||
| 966 | 966 | // If process._fatalException() throws, we are now exiting the Node.js | |
| 967 | 967 | // instance so return to continue the exit routine. | |
| 968 | 968 | // TODO(joyeecheung): return a Maybe here to prevent the caller from | |
| 969 | 969 | // stepping on the exit. | |
| 970 | - if (handled.IsEmpty()) { | ||
| 970 | + Local<Value> handled; | ||
| 971 | + if (!maybe_handled.ToLocal(&handled)) { | ||
| 971 | 972 | return; | |
| 972 | 973 | } | |
| 973 | 974 | ||
@@ -977,7 +978,7 @@ void TriggerUncaughtException(Isolate* isolate, | |||
| 977 | 978 | // TODO(joyeecheung): This has been only checking that the return value is | |
| 978 | 979 | // exactly false. Investigate whether this can be turned to an "if true" | |
| 979 | 980 | // similar to how the worker global uncaught exception handler handles it. | |
| 980 | - if (!handled.ToLocalChecked()->IsFalse()) { | ||
| 981 | + if (!handled->IsFalse()) { | ||
| 981 | 982 | return; | |
| 982 | 983 | } | |
| 983 | 984 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments