зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1382722 - Trigger debugger GC notification once at the end of GC r=sfink
This commit is contained in:
Родитель
1aa04fef20
Коммит
ba0373934d
|
@ -216,15 +216,11 @@ struct Zone : public JS::shadow::Zone,
|
|||
|
||||
bool canCollect();
|
||||
|
||||
void notifyObservingDebuggers();
|
||||
|
||||
void changeGCState(GCState prev, GCState next) {
|
||||
MOZ_ASSERT(CurrentThreadIsHeapBusy());
|
||||
MOZ_ASSERT(gcState() == prev);
|
||||
MOZ_ASSERT_IF(next != NoGC, canCollect());
|
||||
gcState_ = next;
|
||||
if (isGCFinished())
|
||||
notifyObservingDebuggers();
|
||||
}
|
||||
|
||||
bool isCollecting() const {
|
||||
|
@ -303,6 +299,8 @@ struct Zone : public JS::shadow::Zone,
|
|||
DebuggerVector* getDebuggers() const { return debuggers; }
|
||||
DebuggerVector* getOrCreateDebuggers(JSContext* cx);
|
||||
|
||||
void notifyObservingDebuggers();
|
||||
|
||||
void clearTables();
|
||||
|
||||
/*
|
||||
|
|
|
@ -6137,6 +6137,7 @@ GCRuntime::finishCollection(JS::gcreason::Reason reason)
|
|||
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
|
||||
if (zone->isCollecting()) {
|
||||
zone->changeGCState(Zone::Finished, Zone::NoGC);
|
||||
zone->notifyObservingDebuggers();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!zone->isCollectingFromAnyThread());
|
||||
|
|
Загрузка…
Ссылка в новой задаче