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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
  • Loading branch information
joyeecheung authored and danielleadams committed Apr 11, 2023
1 parent c0b6794 commit 88baf98
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("env", env_);
tracker->TrackField("cleanup_queue", cleanup_queue_);

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

void Realm::CreateProperties() {
Expand Down

0 comments on commit 88baf98

Please sign in to comment.