Skip to content

Commit 578a2c5

Browse files
joyeecheungtargos
authored andcommitted
src: do not track BaseObjects directly in Realm
They are referenced through the CleanupQueue which is already tracked. Tracking them again in Realms results in duplicates in the heap snapshot. PR-URL: #46470 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
1 parent 078600c commit 578a2c5

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/node_realm.cc

-6
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ void Realm::MemoryInfo(MemoryTracker* tracker) const {
4747
tracker->TrackField("cleanup_queue", cleanup_queue_);
4848
tracker->TrackField("builtins_with_cache", builtins_with_cache);
4949
tracker->TrackField("builtins_without_cache", builtins_without_cache);
50-
51-
ForEachBaseObject([&](BaseObject* obj) {
52-
if (obj->IsDoneInitializing()) {
53-
tracker->Track(obj);
54-
}
55-
});
5650
}
5751

5852
void Realm::CreateProperties() {

0 commit comments

Comments
 (0)