Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: move InternalCallbackScope to StartExecution #31944

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,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, &parameters, &arguments));
}
Expand Down
9 changes: 1 addition & 8 deletions src/node_main_instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 0 additions & 5 deletions src/node_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,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());
Expand Down