summaryrefslogtreecommitdiff
path: root/src/node_util.cc
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-23 09:27:35 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2018-12-29 18:58:39 +0800
commit8a60be4f0fd6a8f6591b7d591e20960fc4372fe4 (patch)
tree2fda3d51f20e2dae137ab1a2a58c6e5049fc2677 /src/node_util.cc
parent00944c7cc25f391c3fbeba1e054a56a62cf0de12 (diff)
downloadandroid-node-v8-8a60be4f0fd6a8f6591b7d591e20960fc4372fe4.tar.gz
android-node-v8-8a60be4f0fd6a8f6591b7d591e20960fc4372fe4.tar.bz2
android-node-v8-8a60be4f0fd6a8f6591b7d591e20960fc4372fe4.zip
process: make internal/queue_microtask.js more self-contained
- Instead of passing triggerFatalException through node.js, simply put it on `internalBinding('util')` which has to be loaded anyway. - Expose the implementation of `queueMicrotask` directly instead of through an unnecessary factory function. PR-URL: https://github.com/nodejs/node/pull/25189 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/node_util.cc')
-rw-r--r--src/node_util.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_util.cc b/src/node_util.cc
index f7412d92bc..2bc2106775 100644
--- a/src/node_util.cc
+++ b/src/node_util.cc
@@ -1,4 +1,5 @@
#include "node_internals.h"
+#include "node_errors.h"
#include "node_watchdog.h"
namespace node {
@@ -221,7 +222,7 @@ void Initialize(Local<Object> target,
WatchdogHasPendingSigint);
env->SetMethod(target, "enqueueMicrotask", EnqueueMicrotask);
-
+ env->SetMethod(target, "triggerFatalException", FatalException);
Local<Object> constants = Object::New(env->isolate());
NODE_DEFINE_CONSTANT(constants, ALL_PROPERTIES);
NODE_DEFINE_CONSTANT(constants, ONLY_WRITABLE);