зеркало из https://github.com/mozilla/gecko-dev.git
Bug 853390 - Notify our listeners after creating decoders to ensure onload is correctly blocked. r=seth
--HG-- extra : rebase_source : f846da6a01b95e2ba389689bb97cb9242fa09a4f
This commit is contained in:
Родитель
27d41a3031
Коммит
aff61943d7
|
@ -2808,8 +2808,12 @@ RasterImage::RequestDecodeCore(RequestDecodeType aDecodeType)
|
|||
// If we don't have a decoder, create one
|
||||
if (!mDecoder) {
|
||||
rv = InitDecoder(/* aDoSizeDecode = */ false);
|
||||
|
||||
CONTAINER_ENSURE_SUCCESS(rv);
|
||||
|
||||
rv = FinishedSomeDecoding();
|
||||
CONTAINER_ENSURE_SUCCESS(rv);
|
||||
|
||||
MOZ_ASSERT(mDecoder);
|
||||
}
|
||||
|
||||
// If we've read all the data we have, we're done
|
||||
|
@ -2907,16 +2911,10 @@ RasterImage::SyncDecode()
|
|||
mDecoder->FlushInvalidations();
|
||||
mInDecoder = false;
|
||||
|
||||
// If we finished the decode, shutdown the decoder
|
||||
if (mDecoder && IsDecodeFinished()) {
|
||||
// We have to shut down the decoder *now*, so we explicitly shut down the
|
||||
// decoder, and let FinishedSomeDecoding handle the rest for us.
|
||||
nsRefPtr<DecodeRequest> request = mDecodeRequest;
|
||||
nsresult rv = ShutdownDecoder(eShutdownIntent_Done);
|
||||
CONTAINER_ENSURE_SUCCESS(rv);
|
||||
rv = FinishedSomeDecoding(eShutdownIntent_Done, request);
|
||||
CONTAINER_ENSURE_SUCCESS(rv);
|
||||
} else if (mDecoder) {
|
||||
rv = FinishedSomeDecoding();
|
||||
CONTAINER_ENSURE_SUCCESS(rv);
|
||||
|
||||
if (mDecoder) {
|
||||
mDecoder->SetSynchronous(false);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче