зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1464134 part 7 - Replace GetAnyCompartmentInZone with GetAnyRealmInZone. r=luke
This commit is contained in:
Родитель
7ff3b9af6c
Коммит
732a7c63d6
|
@ -1271,12 +1271,12 @@ JS::NotifyGCRootsRemoved(JSContext* cx)
|
|||
cx->runtime()->gc.notifyRootsRemoved();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSCompartment*)
|
||||
js::GetAnyCompartmentInZone(JS::Zone* zone)
|
||||
JS_FRIEND_API(JS::Realm*)
|
||||
js::GetAnyRealmInZone(JS::Zone* zone)
|
||||
{
|
||||
CompartmentsInZoneIter comp(zone);
|
||||
MOZ_ASSERT(!comp.done());
|
||||
return comp.get();
|
||||
RealmsInZoneIter realm(zone);
|
||||
MOZ_ASSERT(!realm.done());
|
||||
return realm.get();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -553,8 +553,8 @@ extern JS_FRIEND_API(size_t)
|
|||
SizeOfDataIfCDataObject(mozilla::MallocSizeOf mallocSizeOf, JSObject* obj);
|
||||
#endif
|
||||
|
||||
extern JS_FRIEND_API(JSCompartment*)
|
||||
GetAnyCompartmentInZone(JS::Zone* zone);
|
||||
extern JS_FRIEND_API(JS::Realm*)
|
||||
GetAnyRealmInZone(JS::Zone* zone);
|
||||
|
||||
/*
|
||||
* Shadow declarations of JS internal structures, for access by inline access
|
||||
|
|
|
@ -2165,8 +2165,7 @@ class XPCJSRuntimeStats : public JS::RuntimeStats
|
|||
virtual void initExtraZoneStats(JS::Zone* zone, JS::ZoneStats* zStats) override {
|
||||
// Get some global in this zone.
|
||||
AutoSafeJSContext cx;
|
||||
JSCompartment* comp = js::GetAnyCompartmentInZone(zone);
|
||||
Rooted<Realm*> realm(cx, JS::GetRealmForCompartment(comp));
|
||||
Rooted<Realm*> realm(cx, js::GetAnyRealmInZone(zone));
|
||||
xpc::ZoneStatsExtras* extras = new xpc::ZoneStatsExtras;
|
||||
extras->pathPrefix.AssignLiteral("explicit/js-non-window/zones/");
|
||||
RootedObject global(cx, JS::GetRealmGlobalOrNull(realm));
|
||||
|
|
Загрузка…
Ссылка в новой задаче