Skip to content

Commit

Permalink
src: do not track BaseObjects directly in Realm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
joyeecheung authored and targos committed Mar 14, 2023
1 parent 078600c commit 578a2c5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/node_realm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ void Realm::MemoryInfo(MemoryTracker* tracker) const {
tracker->TrackField("cleanup_queue", cleanup_queue_);
tracker->TrackField("builtins_with_cache", builtins_with_cache);
tracker->TrackField("builtins_without_cache", builtins_without_cache);

ForEachBaseObject([&](BaseObject* obj) {
if (obj->IsDoneInitializing()) {
tracker->Track(obj);
}
});
}

void Realm::CreateProperties() {
Expand Down

0 comments on commit 578a2c5

Please sign in to comment.