mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 716140 - Handle discarding specially so it gets notified synchronously. r=seth
--HG-- extra : rebase_source : 1bd66dcec4925b486af0905dbd07286bb3ae729e
This commit is contained in:
parent
c5a2a76f54
commit
fcda375530
@ -2504,7 +2504,7 @@ RasterImage::Discard(bool force)
|
|||||||
|
|
||||||
// Notify that we discarded
|
// Notify that we discarded
|
||||||
if (mStatusTracker)
|
if (mStatusTracker)
|
||||||
mStatusTracker->GetDecoderObserver()->OnDiscard();
|
mStatusTracker->OnDiscard();
|
||||||
|
|
||||||
if (force)
|
if (force)
|
||||||
DiscardTracker::Remove(&mDiscardTrackerNode);
|
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
|
void
|
||||||
imgStatusTracker::OnDataAvailable()
|
imgStatusTracker::OnDataAvailable()
|
||||||
{
|
{
|
||||||
|
@ -160,6 +160,7 @@ public:
|
|||||||
void OnStartRequest();
|
void OnStartRequest();
|
||||||
void OnDataAvailable();
|
void OnDataAvailable();
|
||||||
void OnStopRequest(bool aLastPart, nsresult aStatus);
|
void OnStopRequest(bool aLastPart, nsresult aStatus);
|
||||||
|
void OnDiscard();
|
||||||
|
|
||||||
/* non-virtual imgIOnloadBlocker methods */
|
/* non-virtual imgIOnloadBlocker methods */
|
||||||
// NB: If UnblockOnload is sent, and then we are asked to replay the
|
// NB: If UnblockOnload is sent, and then we are asked to replay the
|
||||||
|
Loading…
Reference in New Issue
Block a user