From 485ba79a8b7f2c176dcac120352d5ec5282990ab Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 28 Feb 2023 21:52:12 +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. PR-URL: https://github.com/nodejs/node/pull/46470 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Minwoo Jung --- src/node_realm.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/node_realm.cc b/src/node_realm.cc index 187323397bc733..ed141f3d6f4db2 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() {