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 5a494ae

Browse filesBrowse files
danbevtargos
authored andcommitted
src: move no_async_hooks_checks to env
This commit moves the setting of AsyncHooks no_force_checks to the Environment constructor instead of from the Start function in node.cc. PR-URL: #22784 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 15a59bb commit 5a494ae
Copy full SHA for 5a494ae

File tree

Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed
Open diff view settings
Collapse file

‎src/env.cc‎

Copy file name to clipboardExpand all lines: src/env.cc
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ Environment::Environment(IsolateData* isolate_data,
161161

162162
isolate()->GetHeapProfiler()->AddBuildEmbedderGraphCallback(
163163
BuildEmbedderGraph, this);
164+
if (options_->no_force_async_hooks_checks) {
165+
async_hooks_.no_force_checks();
166+
}
164167
}
165168

166169
Environment::~Environment() {
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,12 +2896,6 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data,
28962896
return 12; // Signal internal error.
28972897
}
28982898

2899-
// TODO(addaleax): Maybe access this option directly instead of setting
2900-
// a boolean member of Environment. Ditto below for trace_sync_io.
2901-
if (env.options()->no_force_async_hooks_checks) {
2902-
env.async_hooks()->no_force_checks();
2903-
}
2904-
29052899
{
29062900
Environment::AsyncCallbackScope callback_scope(&env);
29072901
env.async_hooks()->push_async_ids(1, 0);

0 commit comments

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