diff options
Diffstat (limited to 'js/src/gc/GCInternals.h')
-rw-r--r-- | js/src/gc/GCInternals.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/js/src/gc/GCInternals.h b/js/src/gc/GCInternals.h index 722539e1c..0d2bed0c1 100644 --- a/js/src/gc/GCInternals.h +++ b/js/src/gc/GCInternals.h @@ -61,50 +61,10 @@ class MOZ_RAII AutoPrepareForTracing AbortReason IsIncrementalGCUnsafe(JSRuntime* rt); -#ifdef JS_GC_ZEAL - -class MOZ_RAII AutoStopVerifyingBarriers -{ - GCRuntime* gc; - bool restartPreVerifier; - - public: - AutoStopVerifyingBarriers(JSRuntime* rt, bool isShutdown) - : gc(&rt->gc) - { - if (gc->isVerifyPreBarriersEnabled()) { - gc->endVerifyPreBarriers(); - restartPreVerifier = !isShutdown; - } else { - restartPreVerifier = false; - } - } - - ~AutoStopVerifyingBarriers() { - // Nasty special case: verification runs a minor GC, which *may* nest - // inside of an outer minor GC. This is not allowed by the - // gc::Statistics phase tree. So we pause the "real" GC, if in fact one - // is in progress. - gcstats::Phase outer = gc->stats.currentPhase(); - if (outer != gcstats::PHASE_NONE) - gc->stats.endPhase(outer); - MOZ_ASSERT((gc->stats.currentPhase() == gcstats::PHASE_NONE) || - (gc->stats.currentPhase() == gcstats::PHASE_GC_BEGIN) || - (gc->stats.currentPhase() == gcstats::PHASE_GC_END)); - - if (restartPreVerifier) - gc->startVerifyPreBarriers(); - - if (outer != gcstats::PHASE_NONE) - gc->stats.beginPhase(outer); - } -}; -#else struct MOZ_RAII AutoStopVerifyingBarriers { AutoStopVerifyingBarriers(JSRuntime*, bool) {} }; -#endif /* JS_GC_ZEAL */ #ifdef JSGC_HASH_TABLE_CHECKS void CheckHashTablesAfterMovingGC(JSRuntime* rt); |