mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1014092 - Disable incemental marking validation on B2G r=terrence
--HG-- extra : rebase_source : 424dd5fe000800e0386242a44c0a57181a9f2131
This commit is contained in:
parent
3936ac0eab
commit
ee0e24b008
@ -19,6 +19,11 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "gc/Tracer.h"
|
#include "gc/Tracer.h"
|
||||||
|
|
||||||
|
/* Perform validation of incremental marking in debug builds but not on B2G. */
|
||||||
|
#if defined(DEBUG) && !defined(MOZ_B2G)
|
||||||
|
#define JS_GC_MARKING_VALIDATION
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace js {
|
namespace js {
|
||||||
|
|
||||||
struct ScriptAndCounts
|
struct ScriptAndCounts
|
||||||
@ -410,7 +415,7 @@ class GCRuntime
|
|||||||
*/
|
*/
|
||||||
js::gc::ArenaHeader *arenasAllocatedDuringSweep;
|
js::gc::ArenaHeader *arenasAllocatedDuringSweep;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef JS_GC_MARKING_VALIDATION
|
||||||
js::gc::MarkingValidator *markingValidator;
|
js::gc::MarkingValidator *markingValidator;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1086,7 +1086,7 @@ GCRuntime::GCRuntime(JSRuntime *rt) :
|
|||||||
sweepKindIndex(0),
|
sweepKindIndex(0),
|
||||||
abortSweepAfterCurrentGroup(false),
|
abortSweepAfterCurrentGroup(false),
|
||||||
arenasAllocatedDuringSweep(nullptr),
|
arenasAllocatedDuringSweep(nullptr),
|
||||||
#ifdef DEBUG
|
#ifdef JS_GC_MARKING_VALIDATION
|
||||||
markingValidator(nullptr),
|
markingValidator(nullptr),
|
||||||
#endif
|
#endif
|
||||||
interFrameGC(0),
|
interFrameGC(0),
|
||||||
@ -3159,6 +3159,10 @@ class js::gc::MarkingValidator
|
|||||||
BitmapMap map;
|
BitmapMap map;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // DEBUG
|
||||||
|
|
||||||
|
#ifdef JS_GC_MARKING_VALIDATION
|
||||||
|
|
||||||
js::gc::MarkingValidator::MarkingValidator(GCRuntime *gc)
|
js::gc::MarkingValidator::MarkingValidator(GCRuntime *gc)
|
||||||
: gc(gc),
|
: gc(gc),
|
||||||
initialized(false)
|
initialized(false)
|
||||||
@ -3347,12 +3351,12 @@ js::gc::MarkingValidator::validate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // JS_GC_MARKING_VALIDATION
|
||||||
|
|
||||||
void
|
void
|
||||||
GCRuntime::computeNonIncrementalMarkingForValidation()
|
GCRuntime::computeNonIncrementalMarkingForValidation()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef JS_GC_MARKING_VALIDATION
|
||||||
JS_ASSERT(!markingValidator);
|
JS_ASSERT(!markingValidator);
|
||||||
if (isIncremental && validate)
|
if (isIncremental && validate)
|
||||||
markingValidator = js_new<MarkingValidator>(this);
|
markingValidator = js_new<MarkingValidator>(this);
|
||||||
@ -3364,7 +3368,7 @@ GCRuntime::computeNonIncrementalMarkingForValidation()
|
|||||||
void
|
void
|
||||||
GCRuntime::validateIncrementalMarking()
|
GCRuntime::validateIncrementalMarking()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef JS_GC_MARKING_VALIDATION
|
||||||
if (markingValidator)
|
if (markingValidator)
|
||||||
markingValidator->validate();
|
markingValidator->validate();
|
||||||
#endif
|
#endif
|
||||||
@ -3373,7 +3377,7 @@ GCRuntime::validateIncrementalMarking()
|
|||||||
void
|
void
|
||||||
GCRuntime::finishMarkingValidation()
|
GCRuntime::finishMarkingValidation()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef JS_GC_MARKING_VALIDATION
|
||||||
js_delete(markingValidator);
|
js_delete(markingValidator);
|
||||||
markingValidator = nullptr;
|
markingValidator = nullptr;
|
||||||
#endif
|
#endif
|
||||||
@ -3382,7 +3386,7 @@ GCRuntime::finishMarkingValidation()
|
|||||||
static void
|
static void
|
||||||
AssertNeedsBarrierFlagsConsistent(JSRuntime *rt)
|
AssertNeedsBarrierFlagsConsistent(JSRuntime *rt)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef JS_GC_MARKING_VALIDATION
|
||||||
bool anyNeedsBarrier = false;
|
bool anyNeedsBarrier = false;
|
||||||
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next())
|
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next())
|
||||||
anyNeedsBarrier |= zone->needsBarrier();
|
anyNeedsBarrier |= zone->needsBarrier();
|
||||||
|
Loading…
Reference in New Issue
Block a user