diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index f666981598a..6d30f54f010 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -187,8 +187,10 @@ struct JSThread { /* Property cache for faster call/get/set invocation. */ JSPropertyCache propertyCache; +#ifdef JS_TRACER /* Trace-tree JIT recorder/interpreter state. */ JSTraceMonitor traceMonitor; +#endif /* Lock-free list of scripts created by eval to garbage-collect. */ JSScript *scriptsToGC; diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 1d6b3fd36fd..10911f14cc7 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1834,7 +1834,11 @@ js_NewGCThing(JSContext *cx, uintN flags, size_t nbytes) arenaList = &rt->gcArenaList[flindex]; for (;;) { - if (doGC && !JS_ON_TRACE(cx) && !JS_TRACE_MONITOR(cx).useReservedObjects) { + if (doGC +#ifdef JS_TRACER + && !JS_ON_TRACE(cx) && !JS_TRACE_MONITOR(cx).useReservedObjects +#endif + ) { /* * Keep rt->gcLock across the call into js_GC so we don't starve * and lose to racing threads who deplete the heap just after @@ -3100,6 +3104,7 @@ js_TraceRuntime(JSTracer *trc, JSBool allAtoms) if (rt->gcExtraRootsTraceOp) rt->gcExtraRootsTraceOp(trc, rt->gcExtraRootsData); +#ifdef JS_TRACER #ifdef JS_THREADSAFE /* Trace the loop table(s) which can contain pointers to code objects. */ while ((acx = js_ContextIterator(rt, JS_FALSE, &iter)) != NULL) { @@ -3110,6 +3115,7 @@ js_TraceRuntime(JSTracer *trc, JSBool allAtoms) #else js_TraceTraceMonitor(trc, &rt->traceMonitor); #endif +#endif } static void