Backed out changeset 8a6e3d229183 (bug 887466) because of assertion failures

This commit is contained in:
Joe Drew 2013-07-26 14:02:57 -04:00
parent 8e80e71596
commit 8521d1827a

View File

@ -2325,6 +2325,18 @@ RasterImage::RequestDecodeCore(RequestDecodeType aDecodeType)
nsresult
RasterImage::SyncDecode()
{
MutexAutoLock imgLock(mDecodingMutex);
if (mDecodeRequest) {
// If the image is waiting for decode work to be notified, go ahead and do that.
if (mDecodeRequest->mRequestStatus == DecodeRequest::REQUEST_WORK_DONE) {
nsresult rv = FinishedSomeDecoding();
CONTAINER_ENSURE_SUCCESS(rv);
}
}
nsresult rv;
PROFILER_LABEL_PRINTF("RasterImage", "SyncDecode", "%s", GetURIString().get());;
// We really have no good way of forcing a synchronous decode if we're being
@ -2346,18 +2358,6 @@ RasterImage::SyncDecode()
}
}
MutexAutoLock imgLock(mDecodingMutex);
if (mDecodeRequest) {
// If the image is waiting for decode work to be notified, go ahead and do that.
if (mDecodeRequest->mRequestStatus == DecodeRequest::REQUEST_WORK_DONE) {
nsresult rv = FinishedSomeDecoding();
CONTAINER_ENSURE_SUCCESS(rv);
}
}
nsresult rv;
// If we're decoded already, or decoding until the size was available
// finished us as a side-effect, no worries
if (mDecoded)