mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-29 11:57:55 +00:00
Bug 751618 - Zone renaming part 9 (r=terrence)
This commit is contained in:
parent
85d4900acd
commit
637b55db56
@ -933,7 +933,7 @@ JSRuntime::init(uint32_t maxbytes)
|
||||
return false;
|
||||
}
|
||||
|
||||
atomsCompartment->isSystemCompartment = true;
|
||||
atomsCompartment->isSystem = true;
|
||||
atomsCompartment->setGCLastBytes(8192, GC_NORMAL);
|
||||
|
||||
if (!InitAtoms(this))
|
||||
|
@ -64,7 +64,7 @@ JSCompartment::JSCompartment(JSRuntime *rt)
|
||||
gcTriggerBytes(0),
|
||||
gcHeapGrowthFactor(3.0),
|
||||
hold(false),
|
||||
isSystemCompartment(false),
|
||||
isSystem(false),
|
||||
lastCodeRelease(0),
|
||||
analysisLifoAlloc(LIFO_ALLOC_PRIMARY_CHUNK_SIZE),
|
||||
typeLifoAlloc(LIFO_ALLOC_PRIMARY_CHUNK_SIZE),
|
||||
|
@ -335,7 +335,7 @@ struct JSCompartment : private JS::shadow::Zone, public js::gc::GraphNodeBase<JS
|
||||
double gcHeapGrowthFactor;
|
||||
|
||||
bool hold;
|
||||
bool isSystemCompartment;
|
||||
bool isSystem;
|
||||
|
||||
int64_t lastCodeRelease;
|
||||
|
||||
|
@ -218,7 +218,7 @@ JS_SetCompartmentPrincipals(JSCompartment *compartment, JSPrincipals *principals
|
||||
// with the old one, but JSPrincipals doesn't give us a way to do that.
|
||||
// But we can at least assert that we're not switching between system
|
||||
// and non-system.
|
||||
JS_ASSERT(compartment->zone()->isSystemCompartment == isSystem);
|
||||
JS_ASSERT(compartment->zone()->isSystem == isSystem);
|
||||
}
|
||||
|
||||
// Set up the new principals.
|
||||
@ -228,7 +228,7 @@ JS_SetCompartmentPrincipals(JSCompartment *compartment, JSPrincipals *principals
|
||||
}
|
||||
|
||||
// Update the system flag.
|
||||
compartment->zone()->isSystemCompartment = isSystem;
|
||||
compartment->zone()->isSystem = isSystem;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSBool)
|
||||
@ -318,7 +318,7 @@ AutoSwitchCompartment::~AutoSwitchCompartment()
|
||||
JS_FRIEND_API(bool)
|
||||
js::IsSystemCompartment(const JSCompartment *c)
|
||||
{
|
||||
return c->zone()->isSystemCompartment;
|
||||
return c->zone()->isSystem;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(bool)
|
||||
|
@ -676,7 +676,7 @@ static inline Chunk **
|
||||
GetAvailableChunkList(Zone *zone)
|
||||
{
|
||||
JSRuntime *rt = zone->rt;
|
||||
return zone->isSystemCompartment
|
||||
return zone->isSystem
|
||||
? &rt->gcSystemAvailableChunkListHead
|
||||
: &rt->gcUserAvailableChunkListHead;
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ JS::SystemCompartmentCount(const JSRuntime *rt)
|
||||
{
|
||||
size_t n = 0;
|
||||
for (size_t i = 0; i < rt->compartments.length(); i++) {
|
||||
if (rt->compartments[i]->zone()->isSystemCompartment)
|
||||
if (rt->compartments[i]->zone()->isSystem)
|
||||
++n;
|
||||
}
|
||||
return n;
|
||||
@ -345,7 +345,7 @@ JS::UserCompartmentCount(const JSRuntime *rt)
|
||||
{
|
||||
size_t n = 0;
|
||||
for (size_t i = 0; i < rt->compartments.length(); i++) {
|
||||
if (!rt->compartments[i]->zone()->isSystemCompartment)
|
||||
if (!rt->compartments[i]->zone()->isSystem)
|
||||
++n;
|
||||
}
|
||||
return n;
|
||||
|
Loading…
Reference in New Issue
Block a user