Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-11-03 15:00:24 +0300
committerMyles Borins <mylesborins@google.com>2019-11-17 10:59:08 +0300
commite3371f0c93b7f3fa66381aad393cc4b5eb9b9dca (patch)
tree8ddba79e0c0c0a27da87f29d9af6cd4661abdb81 /src/node.cc
parent8fe684961b6de567acbb85bbf87e60f8ec578376 (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.cc9
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, &parameters, &arguments)
- .ToLocal(&result) ||
- !task_queue::RunNextTicksNative(env)) {
- return MaybeLocal<Value>();
- }
- return scope.Escape(result);
+ return scope.EscapeMaybe(
+ ExecuteBootstrapper(env, main_script_id, &parameters, &arguments));
}
MaybeLocal<Value> StartMainThreadExecution(Environment* env) {