mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +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(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
|
||||
// chunks available.
|
||||
while (!GetDecodeDone() && !HasError()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user