mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1285867 (Part 3a) - Don't attempt to keep decoding if we're already done. r=edwin
This commit is contained in:
parent
0872ad00cb
commit
f5b3f999dd
@ -119,6 +119,11 @@ Decoder::Decode(NotNull<IResumable*> aOnResume)
|
|||||||
MOZ_ASSERT(mInitialized, "Should be initialized here");
|
MOZ_ASSERT(mInitialized, "Should be initialized here");
|
||||||
MOZ_ASSERT(mIterator, "Should have a SourceBufferIterator");
|
MOZ_ASSERT(mIterator, "Should have a SourceBufferIterator");
|
||||||
|
|
||||||
|
// If we're already done, don't attempt to keep decoding.
|
||||||
|
if (GetDecodeDone()) {
|
||||||
|
return HasError() ? NS_ERROR_FAILURE : NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
// We keep decoding chunks until the decode completes or there are no more
|
// We keep decoding chunks until the decode completes or there are no more
|
||||||
// chunks available.
|
// chunks available.
|
||||||
while (!GetDecodeDone() && !HasError()) {
|
while (!GetDecodeDone() && !HasError()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user