diff options
author | Gus Caplan <me@gus.host> | 2018-09-23 22:22:34 -0500 |
---|---|---|
committer | Gus Caplan <me@gus.host> | 2018-09-24 00:07:33 -0500 |
commit | ea8000f1195801cf602946c6bd85b8b5dbe83d43 (patch) | |
tree | 84ee20612b1181c3bbcedde56bcf868f1ce15d6c | |
parent | 7dde560beb736e82b7867130a2d5824544122a60 (diff) | |
download | android-node-v8-ea8000f1195801cf602946c6bd85b8b5dbe83d43.tar.gz android-node-v8-ea8000f1195801cf602946c6bd85b8b5dbe83d43.tar.bz2 android-node-v8-ea8000f1195801cf602946c6bd85b8b5dbe83d43.zip |
lib: lazy load internal/queue_microtask
PR-URL: https://github.com/nodejs/node/pull/23046
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
-rw-r--r-- | lib/internal/bootstrap/node.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index e1c56e9b7e..bcbb96a87f 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -529,11 +529,12 @@ } function setupQueueMicrotask() { - const { queueMicrotask } = NativeModule.require('internal/queue_microtask'); Object.defineProperty(global, 'queueMicrotask', { get: () => { process.emitWarning('queueMicrotask() is experimental.', 'ExperimentalWarning'); + const { queueMicrotask } = + NativeModule.require('internal/queue_microtask'); Object.defineProperty(global, 'queueMicrotask', { value: queueMicrotask, writable: true, |