mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
src: move InternalCallbackScope to StartExecution
PR-URL: https://github.com/nodejs/node/pull/31944 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
1 parent
b4ca132254
commit
ffefb059e2
3 files changed
+7
-13
No files matched your search
@@ -389,6 +389,12 @@ MaybeLocal<Value> StartExecution(Environment* env, const char* main_script_id) {
|
||||
->GetFunction(env->context())
|
||||
.ToLocalChecked()};
|
||||
|
||||
InternalCallbackScope callback_scope(
|
||||
env,
|
||||
Object::New(env->isolate()),
|
||||
{ 1, 0 },
|
||||
InternalCallbackScope::kSkipAsyncHooks);
|
||||
|
||||
return scope.EscapeMaybe(
|
||||
ExecuteBootstrapper(env, main_script_id, ¶meters, &arguments));
|
||||
}
|
||||
|
||||
@@ -122,14 +122,7 @@ int NodeMainInstance::Run() {
|
||||
Context::Scope context_scope(env->context());
|
||||
|
||||
if (exit_code == 0) {
|
||||
{
|
||||
InternalCallbackScope callback_scope(
|
||||
env.get(),
|
||||
Object::New(isolate_),
|
||||
{ 1, 0 },
|
||||
InternalCallbackScope::kSkipAsyncHooks);
|
||||
LoadEnvironment(env.get());
|
||||
}
|
||||
LoadEnvironment(env.get());
|
||||
|
||||
env->set_trace_sync_io(env->options()->trace_sync_io);
|
||||
|
||||
|
||||
@@ -344,11 +344,6 @@ void Worker::Run() {
|
||||
env_->InitializeInspector(std::move(inspector_parent_handle_));
|
||||
#endif
|
||||
HandleScope handle_scope(isolate_);
|
||||
InternalCallbackScope callback_scope(
|
||||
env_.get(),
|
||||
Object::New(isolate_),
|
||||
{ 1, 0 },
|
||||
InternalCallbackScope::kSkipAsyncHooks);
|
||||
|
||||
if (!env_->RunBootstrapping().IsEmpty()) {
|
||||
CreateEnvMessagePort(env_.get());
|
||||
|
||||
Reference in new issue
Block a user