Bug 881333 - Fix break in GGC builds.
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 10 Jun 2013 16:08:55 -0600
changeset 134571 b0afcbcafb72585a956a53e04384536bba81f9c9
parent 134570 85af7479df1c5da42e2f4d9cbd2f238a29e9036f
child 134572 c0218a6cb1ed384010e6e6cb731186216723c4ae
push id29276
push userbhackett@mozilla.com
push dateMon, 10 Jun 2013 22:09:08 +0000
treeherdermozilla-inbound@b0afcbcafb72 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs881333
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 881333 - Fix break in GGC builds.
js/src/ion/CodeGenerator.cpp
js/src/jsgcinlines.h
--- a/js/src/ion/CodeGenerator.cpp
+++ b/js/src/ion/CodeGenerator.cpp
@@ -5304,17 +5304,17 @@ CodeGenerator::link()
         ionScript->copyBailoutTable(&bailouts_[0]);
     if (osiIndices_.length())
         ionScript->copyOsiIndices(&osiIndices_[0], masm);
     if (snapshots_.size())
         ionScript->copySnapshots(&snapshots_);
     if (graph.numConstants())
         ionScript->copyConstants(graph.constantPool());
 #ifdef JSGC_GENERATIONAL
-    cx->runtime->gcStoreBuffer.putGeneric(IonScriptRefs(script));
+    cx->runtime()->gcStoreBuffer.putGeneric(IonScriptRefs(script));
 #endif
     JS_ASSERT(graph.mir().numScripts() > 0);
     ionScript->copyScriptEntries(graph.mir().scripts());
     if (callTargets.length() > 0)
         ionScript->copyCallTargetEntries(callTargets.begin());
 
     // The correct state for prebarriers is unknown until the end of compilation,
     // since a GC can occur during code generation. All barriers are emitted
--- a/js/src/jsgcinlines.h
+++ b/js/src/jsgcinlines.h
@@ -468,18 +468,18 @@ typedef CompartmentsIterT<GCZoneGroupIte
 /*
  * Attempt to allocate a new GC thing out of the nursery. If there is not enough
  * room in the nursery or there is an OOM, this method will return NULL.
  */
 template <typename T, AllowGC allowGC>
 inline T *
 TryNewNurseryGCThing(JSContext *cx, size_t thingSize)
 {
-    JS_ASSERT(!IsAtomsCompartment(cx->compartment));
-    JSRuntime *rt = cx->runtime;
+    JS_ASSERT(!IsAtomsCompartment(cx->compartment()));
+    JSRuntime *rt = cx->runtime();
     Nursery &nursery = rt->gcNursery;
     T *t = static_cast<T *>(nursery.allocate(thingSize));
     if (t)
         return t;
     if (allowGC && !rt->mainThread.suppressGC) {
         MinorGC(rt, JS::gcreason::OUT_OF_NURSERY);
 
         /* Exceeding gcMaxBytes while tenuring can disable the Nursery. */
@@ -534,21 +534,21 @@ NewGCThing(JSContext *cx, AllocKind kind
     T *t = static_cast<T *>(zone->allocator.arenas.allocateFromFreeList(kind, thingSize));
     if (!t)
         t = static_cast<T *>(js::gc::ArenaLists::refillFreeList<allowGC>(cx, kind));
 
     JS_ASSERT_IF(t && zone->wasGCStarted() && (zone->isGCMarking() || zone->isGCSweeping()),
                  t->arenaHeader()->allocatedDuringIncremental);
 
 #if defined(JSGC_GENERATIONAL) && defined(JS_GC_ZEAL)
-    if (cx->runtime->gcVerifyPostData &&
-        ShouldNurseryAllocate(cx->runtime->gcVerifierNursery, kind, heap))
+    if (cx->runtime()->gcVerifyPostData &&
+        ShouldNurseryAllocate(cx->runtime()->gcVerifierNursery, kind, heap))
     {
-        JS_ASSERT(!IsAtomsCompartment(cx->compartment));
-        cx->runtime->gcVerifierNursery.insertPointer(t);
+        JS_ASSERT(!IsAtomsCompartment(cx->compartment()));
+        cx->runtime()->gcVerifierNursery.insertPointer(t);
     }
 #endif
 
     return t;
 }
 
 } /* namespace gc */
 } /* namespace js */