Bug 1337829 - ImageOps::DecodeToSurface tries to complete an already complete Sourcebuffer.r=aosmond

MozReview-Commit-ID: 18OM4WgQNud

--HG--
extra : rebase_source : f5491533d7497c2b4e610d83d34a3b3f5c46c87f
This commit is contained in:
Marco Bonardo 2017-02-08 17:33:39 +01:00
parent b6099a12e2
commit da3a159603

View File

@ -113,7 +113,10 @@ ImageOps::DecodeToSurface(nsIInputStream* aInputStream,
if (NS_FAILED(rv)) {
return nullptr;
}
sourceBuffer->Complete(NS_OK);
// Make sure our sourceBuffer is marked as complete.
if (!sourceBuffer->IsComplete()) {
sourceBuffer->Complete(NS_OK);
}
// Create a decoder.
DecoderType decoderType =