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 13, 2023
1 parent bf2c7c7 commit 485ba79
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 485ba79

Please sign in to comment.