Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3497370

Browse filesBrowse files
committed
src: move InternalCallbackScope to StartExecution
PR-URL: #31944 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent ca44071 commit 3497370
Copy full SHA for 3497370

File tree

Expand file treeCollapse file tree

3 files changed

+7
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-13
lines changed
Open diff view settings
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ MaybeLocal<Value> StartExecution(Environment* env, const char* main_script_id) {
395395
->GetFunction(env->context())
396396
.ToLocalChecked()};
397397

398+
InternalCallbackScope callback_scope(
399+
env,
400+
Object::New(env->isolate()),
401+
{ 1, 0 },
402+
InternalCallbackScope::kSkipAsyncHooks);
403+
398404
return scope.EscapeMaybe(
399405
ExecuteBootstrapper(env, main_script_id, &parameters, &arguments));
400406
}
Collapse file

‎src/node_main_instance.cc‎

Copy file name to clipboardExpand all lines: src/node_main_instance.cc
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,7 @@ int NodeMainInstance::Run() {
122122
Context::Scope context_scope(env->context());
123123

124124
if (exit_code == 0) {
125-
{
126-
InternalCallbackScope callback_scope(
127-
env.get(),
128-
Object::New(isolate_),
129-
{ 1, 0 },
130-
InternalCallbackScope::kSkipAsyncHooks);
131-
LoadEnvironment(env.get());
132-
}
125+
LoadEnvironment(env.get());
133126

134127
env->set_trace_sync_io(env->options()->trace_sync_io);
135128

Collapse file

‎src/node_worker.cc‎

Copy file name to clipboardExpand all lines: src/node_worker.cc
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,6 @@ void Worker::Run() {
341341
env_->InitializeInspector(std::move(inspector_parent_handle_));
342342
#endif
343343
HandleScope handle_scope(isolate_);
344-
InternalCallbackScope callback_scope(
345-
env_.get(),
346-
Object::New(isolate_),
347-
{ 1, 0 },
348-
InternalCallbackScope::kSkipAsyncHooks);
349344

350345
if (!env_->RunBootstrapping().IsEmpty()) {
351346
CreateEnvMessagePort(env_.get());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.