bug 975782 bring media resource loads out of background while they delay the load event r=cpearce
This will happen after a stalled load doesn't delay the load event but such a load then delays the load event again when it receives progress.
This commit is contained in:
@@ -3752,15 +3752,14 @@ void HTMLMediaElement::ChangeDelayLoadStatus(bool aDelay)
|
||||
|
||||
mDelayingLoadEvent = aDelay;
|
||||
|
||||
LOG(PR_LOG_DEBUG, ("%p ChangeDelayLoadStatus(%d) doc=0x%p", this, aDelay, mLoadBlockedDoc.get()));
|
||||
if (mDecoder) {
|
||||
mDecoder->SetLoadInBackground(!aDelay);
|
||||
}
|
||||
if (aDelay) {
|
||||
mLoadBlockedDoc = OwnerDoc();
|
||||
mLoadBlockedDoc->BlockOnload();
|
||||
LOG(PR_LOG_DEBUG, ("%p ChangeDelayLoadStatus(%d) doc=0x%p", this, aDelay, mLoadBlockedDoc.get()));
|
||||
} else {
|
||||
if (mDecoder) {
|
||||
mDecoder->MoveLoadsToBackground();
|
||||
}
|
||||
LOG(PR_LOG_DEBUG, ("%p ChangeDelayLoadStatus(%d) doc=0x%p", this, aDelay, mLoadBlockedDoc.get()));
|
||||
// mLoadBlockedDoc might be null due to GC unlinking
|
||||
if (mLoadBlockedDoc) {
|
||||
mLoadBlockedDoc->UnblockOnload(false);
|
||||
|
||||
Reference in New Issue
Block a user