diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index da5ae899b8c6..0488727b160a 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -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)) diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp index 62fb1f2279f2..f9a973196bd6 100644 --- a/js/src/jscompartment.cpp +++ b/js/src/jscompartment.cpp @@ -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), diff --git a/js/src/jscompartment.h b/js/src/jscompartment.h index 45adbbdbb5ce..2a3fbf0a7ca0 100644 --- a/js/src/jscompartment.h +++ b/js/src/jscompartment.h @@ -335,7 +335,7 @@ struct JSCompartment : private JS::shadow::Zone, public js::gc::GraphNodeBasezone()->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) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 6c2b3c383b92..7326dc59c19b 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -676,7 +676,7 @@ static inline Chunk ** GetAvailableChunkList(Zone *zone) { JSRuntime *rt = zone->rt; - return zone->isSystemCompartment + return zone->isSystem ? &rt->gcSystemAvailableChunkListHead : &rt->gcUserAvailableChunkListHead; } diff --git a/js/src/jsmemorymetrics.cpp b/js/src/jsmemorymetrics.cpp index 1a00e0209107..f59dc5c4c288 100644 --- a/js/src/jsmemorymetrics.cpp +++ b/js/src/jsmemorymetrics.cpp @@ -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;