From c49c39b71526b1e31c2361a40cbb5f6a7f972110 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 31 Jan 2023 22:06:27 +0100 Subject: [PATCH] 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. --- src/node_realm.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/node_realm.cc b/src/node_realm.cc index e0fcd3a0775973..df6b49cd0fcad1 100644 --- a/src/node_realm.cc +++ b/src/node_realm.cc @@ -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() {