зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1341096 - Make JS::IsIncrementalBarrierNeeded return true while sweeping incrementally r=sfink a=abillings
This commit is contained in:
Родитель
ce13019950
Коммит
d36c4c59f4
|
@ -7546,7 +7546,11 @@ JS::IsIncrementalGCInProgress(JSContext* cx)
|
|||
JS_PUBLIC_API(bool)
|
||||
JS::IsIncrementalBarrierNeeded(JSContext* cx)
|
||||
{
|
||||
return cx->runtime()->gc.state() == gc::State::Mark && !JS::CurrentThreadIsHeapBusy();
|
||||
if (JS::CurrentThreadIsHeapBusy())
|
||||
return false;
|
||||
|
||||
auto state = cx->runtime()->gc.state();
|
||||
return state != gc::State::NotActive || state <= gc::State::Sweep;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
|
|
Загрузка…
Ссылка в новой задаче