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 4667c5e

Browse filesBrowse files
hannespayerMylesBorins
authored andcommitted
src: start heap object tracking after platform is initialized
Garbage collection is triggered by the heap object tracker. The garbage collector may spawn garbage collection tasks on the foreground thread. This is only allowed after registering the isolate in the platform which happens in IsolateData. This CL moves the starting of the heap object tracker after calling IsolateData to ensure that. PR-URL: #17249 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
1 parent 0488782 commit 4667c5e
Copy full SHA for 4667c5e

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4887,10 +4887,6 @@ inline int Start(uv_loop_t* event_loop,
48874887
isolate->SetAutorunMicrotasks(false);
48884888
isolate->SetFatalErrorHandler(OnFatalError);
48894889

4890-
if (track_heap_objects) {
4891-
isolate->GetHeapProfiler()->StartTrackingHeapObjects(true);
4892-
}
4893-
48944890
{
48954891
Mutex::ScopedLock scoped_lock(node_isolate_mutex);
48964892
CHECK_EQ(node_isolate, nullptr);
@@ -4907,6 +4903,9 @@ inline int Start(uv_loop_t* event_loop,
49074903
event_loop,
49084904
v8_platform.Platform(),
49094905
allocator.zero_fill_field());
4906+
if (track_heap_objects) {
4907+
isolate->GetHeapProfiler()->StartTrackingHeapObjects(true);
4908+
}
49104909
exit_code = Start(isolate, &isolate_data, argc, argv, exec_argc, exec_argv);
49114910
}
49124911

0 commit comments

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