зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1568543 - Don't report that an incremental GC is in progress when we're verifiying pre barriers r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D39221
This commit is contained in:
Родитель
1eed8d362f
Коммит
294c8a5aa9
|
@ -8908,8 +8908,7 @@ JS_PUBLIC_API bool JS::IsIncrementalGCEnabled(JSContext* cx) {
|
|||
}
|
||||
|
||||
JS_PUBLIC_API bool JS::IsIncrementalGCInProgress(JSContext* cx) {
|
||||
return cx->runtime()->gc.isIncrementalGCInProgress() &&
|
||||
!cx->runtime()->gc.isVerifyPreBarriersEnabled();
|
||||
return cx->runtime()->gc.isIncrementalGCInProgress();
|
||||
}
|
||||
|
||||
JS_PUBLIC_API bool JS::IsIncrementalGCInProgress(JSRuntime* rt) {
|
||||
|
|
|
@ -354,7 +354,9 @@ class GCRuntime {
|
|||
mode == JSGC_MODE_ZONE_INCREMENTAL) &&
|
||||
incrementalAllowed;
|
||||
}
|
||||
bool isIncrementalGCInProgress() const { return state() != State::NotActive; }
|
||||
bool isIncrementalGCInProgress() const {
|
||||
return state() != State::NotActive && !isVerifyPreBarriersEnabled();
|
||||
}
|
||||
bool hasForegroundWork() const;
|
||||
|
||||
bool isCompactingGCEnabled() const;
|
||||
|
@ -489,7 +491,7 @@ class GCRuntime {
|
|||
void startVerifyPreBarriers();
|
||||
void endVerifyPreBarriers();
|
||||
void finishVerifier();
|
||||
bool isVerifyPreBarriersEnabled() const { return !!verifyPreData; }
|
||||
bool isVerifyPreBarriersEnabled() const { return verifyPreData; }
|
||||
bool shouldYieldForZeal(ZealMode mode);
|
||||
#else
|
||||
bool isVerifyPreBarriersEnabled() const { return false; }
|
||||
|
|
|
@ -218,6 +218,7 @@ void gc::GCRuntime::startVerifyPreBarriers() {
|
|||
/* Create the root node. */
|
||||
trc->curnode = MakeNode(trc, nullptr, JS::TraceKind(0));
|
||||
|
||||
MOZ_ASSERT(incrementalState == State::NotActive);
|
||||
incrementalState = State::MarkRoots;
|
||||
|
||||
/* Make all the roots be edges emanating from the root node. */
|
||||
|
@ -359,6 +360,7 @@ void gc::GCRuntime::endVerifyPreBarriers() {
|
|||
number++;
|
||||
|
||||
verifyPreData = nullptr;
|
||||
MOZ_ASSERT(incrementalState == State::Mark);
|
||||
incrementalState = State::NotActive;
|
||||
|
||||
if (!compartmentCreated && IsIncrementalGCUnsafe(rt) == AbortReason::None &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче