Bug 976750: Move ifndef to fix "unused function" build warning in RootMarking.cpp. r=terrence
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 27 Feb 2014 15:03:35 -0800
changeset 171452 904254e0935d9e908a287bb9cfb6971f5c5bfc04
parent 171451 629bfbcb8b449e8c9ef66dc6c52908b29c519e9a
child 171453 2a3ff17ca99e0e4de3efd18bbcd6ee189fe5f1e3
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersterrence
bugs976750
milestone30.0a1
Bug 976750: Move ifndef to fix "unused function" build warning in RootMarking.cpp. r=terrence
js/src/gc/RootMarking.cpp
--- a/js/src/gc/RootMarking.cpp
+++ b/js/src/gc/RootMarking.cpp
@@ -242,33 +242,33 @@ MarkIfGCThingWord(JSTracer *trc, uintptr
     if (trc->runtime->gcIncrementalState == MARK_ROOTS)
         trc->runtime->mainThread.gcSavedRoots.append(
             PerThreadData::SavedGCRoot(thing, traceKind));
 #endif
 
     return CGCT_VALID;
 }
 
+#ifndef JSGC_USE_EXACT_ROOTING
 static void
 MarkWordConservatively(JSTracer *trc, uintptr_t w)
 {
     /*
      * The conservative scanner may access words that valgrind considers as
      * undefined. To avoid false positives and not to alter valgrind view of
      * the memory we make as memcheck-defined the argument, a copy of the
      * original word. See bug 572678.
      */
 #ifdef MOZ_VALGRIND
     JS_SILENCE_UNUSED_VALUE_IN_EXPR(VALGRIND_MAKE_MEM_DEFINED(&w, sizeof(w)));
 #endif
 
     MarkIfGCThingWord(trc, w);
 }
 
-#ifndef JSGC_USE_EXACT_ROOTING
 MOZ_ASAN_BLACKLIST
 static void
 MarkRangeConservatively(JSTracer *trc, const uintptr_t *begin, const uintptr_t *end)
 {
     JS_ASSERT(begin <= end);
     for (const uintptr_t *i = begin; i < end; ++i)
         MarkWordConservatively(trc, *i);
 }