diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-11-27 21:36:22 +0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-29 12:55:56 -0800 |
commit | 7b8058a39e3485f7c6aeab87e9953f30c9974afd (patch) | |
tree | 249461ba38fefbc78d69c48fa31e566a6b4c415a /test/message/unhandled_promise_trace_warnings.out | |
parent | 5dacbf594ef80f8eadea274f537cc17cc1e5ebe1 (diff) | |
download | android-node-v8-7b8058a39e3485f7c6aeab87e9953f30c9974afd.tar.gz android-node-v8-7b8058a39e3485f7c6aeab87e9953f30c9974afd.tar.bz2 android-node-v8-7b8058a39e3485f7c6aeab87e9953f30c9974afd.zip |
process: refactor the bootstrap mode branching for readability
This patch refactors the branches for choosing the mode to run
Node.js in `internal/bootstrap/node.js`. Instead of inlining the
decision making all in `startup`, we create a `startExecution()`
function which either detects and start the non-user-code mode,
or prepares for user code execution (worker setup, preloading modules)
and starts user code execution.
We use early returns when we decide the mode to run Node.js in for fewer
indentations and better readability.
This patch also adds a few comments about the command-line switches
and a few TODOs to remove underscore properties on `process` that
are mainly used for bootstrap mode branching. It also includes
a few other refactoring such as inlining functions/variables
that are not reused and removing the default argument of
`evalScript` for better clarity.
PR-URL: https://github.com/nodejs/node/pull/24673
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/message/unhandled_promise_trace_warnings.out')
-rw-r--r-- | test/message/unhandled_promise_trace_warnings.out | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/message/unhandled_promise_trace_warnings.out b/test/message/unhandled_promise_trace_warnings.out index cf12c647ac..2187ee1e85 100644 --- a/test/message/unhandled_promise_trace_warnings.out +++ b/test/message/unhandled_promise_trace_warnings.out @@ -15,6 +15,9 @@ at * at * at * + at * + at * + at * (node:*) Error: This was rejected at * (*test*message*unhandled_promise_trace_warnings.js:*) at * @@ -25,6 +28,7 @@ at * at * at * + at * (node:*) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. at * at * @@ -34,6 +38,8 @@ at * at * at * + at * + at * (node:*) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) at handledRejection (internal/process/promises.js:*) at handler (internal/process/promises.js:*) |