Bug 1404422 - Part 3. Disable triggering imgIOnloadBlocker block/unblock events. r=tnikkel

This commit is contained in:
Andrew Osmond 2017-11-01 06:59:10 -04:00
Родитель 0e2b74f9d2
Коммит 3e3c2a5bca
1 изменённых файлов: 0 добавлений и 15 удалений

Просмотреть файл

@ -333,10 +333,6 @@ SyncNotifyInternal(const T& aObservers,
notify([](IProgressObserver* aObs) { aObs->Notify(I::SIZE_AVAILABLE); });
}
if (aProgress & FLAG_ONLOAD_BLOCKED) {
notify([](IProgressObserver* aObs) { aObs->BlockOnload(); });
}
if (aHasImage) {
// OnFrameUpdate
// If there's any content in this frame at all (always true for
@ -361,13 +357,6 @@ SyncNotifyInternal(const T& aObservers,
}
}
// Send UnblockOnload before OnStopDecode and OnStopRequest. This allows
// observers that can fire events when they receive those notifications to do
// so then, instead of being forced to wait for UnblockOnload.
if (aProgress & FLAG_ONLOAD_UNBLOCKED) {
notify([](IProgressObserver* aObs) { aObs->UnblockOnload(); });
}
if (aProgress & FLAG_DECODE_COMPLETE) {
MOZ_ASSERT(aHasImage, "Stopped decoding without ever having an image?");
notify([](IProgressObserver* aObs) { aObs->Notify(I::DECODE_COMPLETE); });
@ -450,10 +439,6 @@ ProgressTracker::EmulateRequestFinished(IProgressObserver* aObserver)
"SyncNotifyState and mObservers are not threadsafe");
RefPtr<IProgressObserver> kungFuDeathGrip(aObserver);
if (mProgress & FLAG_ONLOAD_BLOCKED && !(mProgress & FLAG_ONLOAD_UNBLOCKED)) {
aObserver->UnblockOnload();
}
if (!(mProgress & FLAG_LOAD_COMPLETE)) {
aObserver->OnLoadComplete(true);
}