GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: remove unnecessary ToLocalChecked node_errors · nodejs/node@c308b06

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_errors.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_errors.cc‎

Copy file name to clipboardExpand all lines: src/node_errors.cc
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ void TriggerUncaughtException(Isolate* isolate,
945945
return;
946946
}
947947

948-
MaybeLocal<Value> handled;
948+
MaybeLocal<Value> maybe_handled;
949949
if (env->can_call_into_js()) {
950950
// We do not expect the global uncaught exception itself to throw any more
951951
// exceptions. If it does, exit the current Node.js instance.
@@ -959,15 +959,16 @@ void TriggerUncaughtException(Isolate* isolate,
959959
Local<Value> argv[2] = { error,
960960
Boolean::New(env->isolate(), from_promise) };
961961

962-
handled = fatal_exception_function.As<Function>()->Call(
962+
maybe_handled = fatal_exception_function.As<Function>()->Call(
963963
env->context(), process_object, arraysize(argv), argv);
964964
}
965965

966966
// If process._fatalException() throws, we are now exiting the Node.js
967967
// instance so return to continue the exit routine.
968968
// TODO(joyeecheung): return a Maybe here to prevent the caller from
969969
// stepping on the exit.
970-
if (handled.IsEmpty()) {
970+
Local<Value> handled;
971+
if (!maybe_handled.ToLocal(&handled)) {
971972
return;
972973
}
973974

@@ -977,7 +978,7 @@ void TriggerUncaughtException(Isolate* isolate,
977978
// TODO(joyeecheung): This has been only checking that the return value is
978979
// exactly false. Investigate whether this can be turned to an "if true"
979980
// similar to how the worker global uncaught exception handler handles it.
980-
if (!handled.ToLocalChecked()->IsFalse()) {
981+
if (!handled->IsFalse()) {
981982
return;
982983
}
983984

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.