зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1463723 - Remove ubi::Census' pointer to the atoms zone r=fitzgen
This commit is contained in:
Родитель
19daeee9b3
Коммит
02d634159d
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче