Bug 716140 - Handle discarding specially so it gets notified synchronously. r=seth

--HG--
extra : rebase_source : 1bd66dcec4925b486af0905dbd07286bb3ae729e
This commit is contained in:
Joe Drew 2013-02-07 17:22:38 -05:00
Родитель c5a2a76f54
Коммит fcda375530
3 изменённых файлов: 14 добавлений и 1 удалений

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

@ -2504,7 +2504,7 @@ RasterImage::Discard(bool force)
// Notify that we discarded
if (mStatusTracker)
mStatusTracker->GetDecoderObserver()->OnDiscard();
mStatusTracker->OnDiscard();
if (force)
DiscardTracker::Remove(&mDiscardTrackerNode);

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

@ -849,6 +849,18 @@ imgStatusTracker::OnStopRequest(bool aLastPart,
}
}
void
imgStatusTracker::OnDiscard()
{
RecordDiscard();
/* notify the kids */
nsTObserverArray<imgRequestProxy*>::ForwardIterator iter(mConsumers);
while (iter.HasMore()) {
SendDiscard(iter.GetNext());
}
}
void
imgStatusTracker::OnDataAvailable()
{

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

@ -160,6 +160,7 @@ public:
void OnStartRequest();
void OnDataAvailable();
void OnStopRequest(bool aLastPart, nsresult aStatus);
void OnDiscard();
/* non-virtual imgIOnloadBlocker methods */
// NB: If UnblockOnload is sent, and then we are asked to replay the