Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 941897c

Browse files
committed
Bug 1735296 - Part 3: Change Zone::RttValueObjectSet to use HeapPtrObject r=sfink
This was a minor optimisation to remove unnecessary barriers but it probably makes negligable difference. Differential Revision: https://phabricator.services.mozilla.com/D128259
1 parent cad0052 commit 941897c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/src/gc/Zone.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ class Zone : public js::ZoneAllocator, public js::gc::GraphNodeBase<JS::Zone> {
271271
// This is used by the GC to trace them all first when compacting, since the
272272
// TypedObject trace hook may access these objects.
273273
//
274-
// There are no barriers here - the set contains only tenured objects so no
274+
// (Although this uses HeapPtrObject, the set contains only tenured objects so no
275275
// post-barrier is required, and these are weak references so no pre-barrier
276-
// is required.
276+
// is required.)
277277
using RttValueObjectSet =
278-
js::GCHashSet<JSObject*, js::MovableCellHasher<JSObject*>,
278+
js::GCHashSet<js::HeapPtrObject, js::MovableCellHasher<js::HeapPtrObject>,
279279
js::SystemAllocPolicy>;
280280

281281
js::ZoneData<JS::WeakCache<RttValueObjectSet>> rttValueObjects_;

0 commit comments

Comments
 (0)