summaryrefslogtreecommitdiff
path: root/src/node_util.cc
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-23 11:42:28 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2018-12-31 14:19:48 +0800
commit7163fbf066fe3e84a2203c01a385df1765d53ab6 (patch)
tree1662f230c7dae483efd9e87dd3f16a2b7a971365 /src/node_util.cc
parentda13c44b0d3e858e6195a56534deb5c22be161c5 (diff)
downloadandroid-node-v8-7163fbf066fe3e84a2203c01a385df1765d53ab6.tar.gz
android-node-v8-7163fbf066fe3e84a2203c01a385df1765d53ab6.tar.bz2
android-node-v8-7163fbf066fe3e84a2203c01a385df1765d53ab6.zip
process: move eval and exception bootstrap ito process/execution.js
This patch: - Moves `tryGetCwd`, `evalScript` and `fatalException` from `bootstrap/node.js` into `process/execution.js` so that they do have to be passed into the worker thread setup function, instead the worker code can require them when necessary. - Moves `setUncaughtExceptionCaptureCallback` and `hasUncaughtExceptionCaptureCallback` along with the two global state `exceptionHandlerState` and `shouldAbortOnUncaughtToggle` info `process.execution.js` as those are only used by the fatalException and these two accessors as one self-contained unit. PR-URL: https://github.com/nodejs/node/pull/25199 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_util.cc')
-rw-r--r--src/node_util.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node_util.cc b/src/node_util.cc
index 2bc2106775..ba81d9d6e7 100644
--- a/src/node_util.cc
+++ b/src/node_util.cc
@@ -233,6 +233,14 @@ void Initialize(Local<Object> target,
target->Set(context,
FIXED_ONE_BYTE_STRING(env->isolate(), "propertyFilter"),
constants).FromJust();
+
+ Local<String> should_abort_on_uncaught_toggle =
+ FIXED_ONE_BYTE_STRING(env->isolate(), "shouldAbortOnUncaughtToggle");
+ CHECK(target
+ ->Set(env->context(),
+ should_abort_on_uncaught_toggle,
+ env->should_abort_on_uncaught_toggle().GetJSArray())
+ .FromJust());
}
} // namespace util