Bug 1463723 - Remove ubi::Census' pointer to the atoms zone r=fitzgen

This commit is contained in:
Jon Coppeard 2018-05-24 09:40:46 +01:00
Родитель 19daeee9b3
Коммит 02d634159d
2 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -199,9 +199,8 @@ struct Census {
// is an element of the set. If the targetZones set is empty, then nodes in
// all zones are considered.
JS::ZoneSet targetZones;
Zone* atomsZone;
explicit Census(JSContext* cx) : cx(cx), atomsZone(nullptr) { }
explicit Census(JSContext* cx) : cx(cx) { }
MOZ_MUST_USE JS_PUBLIC_API(bool) init();
};

Просмотреть файл

@ -32,8 +32,6 @@ CountDeleter::operator()(CountBase* ptr)
JS_PUBLIC_API(bool)
Census::init() {
AutoLockForExclusiveAccess lock(cx);
atomsZone = cx->runtime()->atomsRealm(lock)->zone();
return targetZones.init();
}
@ -942,7 +940,7 @@ CensusHandler::operator() (BreadthFirst<CensusHandler>& traversal,
if (census.targetZones.count() == 0 || census.targetZones.has(zone))
return rootCount->count(mallocSizeOf, referent);
if (zone == census.atomsZone) {
if (zone->isAtomsZone()) {
traversal.abandonReferent();
return rootCount->count(mallocSizeOf, referent);
}