Bug 978188: Guard 'restartVerifier' member-var decl with the same #ifdef as its usage, to fix clang 'unused-private-field' warning. r=terrence
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 28 Feb 2014 12:51:08 -0800
changeset 171610 e5619772fa6338398343ea196077a0dd2bb0f8d6
parent 171609 68cb672eba846cb65100f32ef891e26897d38841
child 171611 d59f2795cc4087bbe070982119c1841efc855e66
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersterrence
bugs978188
milestone30.0a1
Bug 978188: Guard 'restartVerifier' member-var decl with the same #ifdef as its usage, to fix clang 'unused-private-field' warning. r=terrence
js/public/GCAPI.h
js/src/jsfriendapi.cpp
--- a/js/public/GCAPI.h
+++ b/js/public/GCAPI.h
@@ -311,17 +311,17 @@ WasIncrementalGC(JSRuntime *rt);
  *       is non-functional unless SpiderMonkey was configured with
  *       --enable-gcgenerational.
  */
 
 /* Ensure that generational GC is disabled within some scope. */
 class JS_FRIEND_API(AutoDisableGenerationalGC)
 {
     JSRuntime *runtime;
-#ifdef JS_GC_ZEAL
+#if defined(JSGC_GENERATIONAL) && defined(JS_GC_ZEAL)
     bool restartVerifier;
 #endif
 
   public:
     AutoDisableGenerationalGC(JSRuntime *rt);
     ~AutoDisableGenerationalGC();
 };
 
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -927,17 +927,17 @@ JS::IsIncrementalGCInProgress(JSRuntime 
 JS_FRIEND_API(void)
 JS::DisableIncrementalGC(JSRuntime *rt)
 {
     rt->gcIncrementalEnabled = false;
 }
 
 JS::AutoDisableGenerationalGC::AutoDisableGenerationalGC(JSRuntime *rt)
   : runtime(rt)
-#ifdef JS_GC_ZEAL
+#if defined(JSGC_GENERATIONAL) && defined(JS_GC_ZEAL)
   , restartVerifier(rt->gcVerifyPostData)
 #endif
 {
 #ifdef JSGC_GENERATIONAL
     if (IsGenerationalGCEnabled(rt)) {
 #ifdef JS_GC_ZEAL
         if (restartVerifier)
             gc::EndVerifyPostBarriers(rt);