Bug 869730 - Fix an opt build error with --enable-gcgenerational; r=billm
authorTerrence Cole <terrence@mozilla.com>
Tue, 07 May 2013 17:16:29 -0700
changeset 142579 c1a91eac6358a87475071d2a6d56186b39ac0dd2
parent 142578 b7330cb50416891360ac579c282af9680a74b1e5
child 142580 cf21050ee99d08171f0be813648d530fd357b4a1
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs869730
milestone23.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 869730 - Fix an opt build error with --enable-gcgenerational; r=billm
js/src/gc/Nursery.cpp
js/src/jsgc.cpp
js/src/jsgc.h
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -177,43 +177,43 @@ class MinorCollectionTracer : public JST
      * moved things. The list is used to fix up the moved things and to find
      * things held live by intra-Nursery pointers.
      */
     RelocationOverlay *head;
     RelocationOverlay **tail;
 
     /* Save and restore all of the runtime state we use during MinorGC. */
     bool priorNeedsBarrier;
+    AutoDisableProxyCheck disableStrictProxyChecking;
 
     /* Insert the given relocation entry into the list of things to visit. */
     JS_ALWAYS_INLINE void insertIntoFixupList(RelocationOverlay *entry) {
         *tail = entry;
         tail = &entry->next_;
         *tail = NULL;
     }
 
     MinorCollectionTracer(JSRuntime *rt, Nursery *nursery)
       : JSTracer(),
         nursery(nursery),
         runtime(rt),
         session(runtime, MinorCollecting),
         head(NULL),
         tail(&head),
-        priorNeedsBarrier(runtime->needsBarrier())
+        priorNeedsBarrier(runtime->needsBarrier()),
+        disableStrictProxyChecking(runtime)
     {
         JS_TracerInit(this, runtime, Nursery::MinorGCCallback);
         eagerlyTraceWeakMaps = TraceWeakMapKeysValues;
 
         runtime->gcNumber++;
         runtime->setNeedsBarrier(false);
-        ++runtime->gcDisableStrictProxyCheckingCount;
     }
 
     ~MinorCollectionTracer() {
-        --runtime->gcDisableStrictProxyCheckingCount;
         runtime->setNeedsBarrier(priorNeedsBarrier);
     }
 };
 
 } /* namespace gc */
 } /* namespace js */
 
 static AllocKind
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -5084,14 +5084,16 @@ AutoSuppressGC::AutoSuppressGC(JSContext
 
 AutoSuppressGC::AutoSuppressGC(JSCompartment *comp)
   : suppressGC_(comp->rt->mainThread.suppressGC)
 {
     suppressGC_++;
 }
 
 #ifdef DEBUG
-AutoDisableProxyCheck::AutoDisableProxyCheck(JSRuntime *rt)
+AutoDisableProxyCheck::AutoDisableProxyCheck(JSRuntime *rt
+                                             MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
   : count(rt->gcDisableStrictProxyCheckingCount)
 {
+    MOZ_GUARD_OBJECT_NOTIFIER_INIT;
     count++;
 }
 #endif
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -1282,21 +1282,24 @@ class AutoSuppressGC
         suppressGC_--;
     }
 };
 
 } /* namespace gc */
 
 #ifdef DEBUG
 /* Use this to avoid assertions when manipulating the wrapper map. */
-struct AutoDisableProxyCheck
+class AutoDisableProxyCheck
 {
+    MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER;
     uintptr_t &count;
 
-    AutoDisableProxyCheck(JSRuntime *rt);
+  public:
+    AutoDisableProxyCheck(JSRuntime *rt
+                          MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
 
     ~AutoDisableProxyCheck() {
         count--;
     }
 };
 #else
 struct AutoDisableProxyCheck
 {