diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-11-03 15:00:24 +0300 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2019-11-17 10:59:08 +0300 |
commit | e3371f0c93b7f3fa66381aad393cc4b5eb9b9dca (patch) | |
tree | 8ddba79e0c0c0a27da87f29d9af6cd4661abdb81 /src/node.cc | |
parent | 8fe684961b6de567acbb85bbf87e60f8ec578376 (diff) |
src: use callback scope for main script
This allows removing custom code for setting the current async ids
and running nextTicks.
PR-URL: https://github.com/nodejs/node/pull/30236
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/node.cc b/src/node.cc index f437ea4be96..0b7fca544f8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -406,13 +406,8 @@ MaybeLocal<Value> StartExecution(Environment* env, const char* main_script_id) { ->GetFunction(env->context()) .ToLocalChecked()}; - Local<Value> result; - if (!ExecuteBootstrapper(env, main_script_id, ¶meters, &arguments) - .ToLocal(&result) || - !task_queue::RunNextTicksNative(env)) { - return MaybeLocal<Value>(); - } - return scope.Escape(result); + return scope.EscapeMaybe( + ExecuteBootstrapper(env, main_script_id, ¶meters, &arguments)); } MaybeLocal<Value> StartMainThreadExecution(Environment* env) { |