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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Joyee Cheung authored and Danielle Adams committed 2023-04-10 20:55:05 -04:00
1 parent c0b6794f82
commit 88baf98fa3
1 file changed
-6
-6
View File
@@ -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() {