Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Backed out changeset c5285ff72ac4 (bug 1439433) for build bustage. CL…
Browse files Browse the repository at this point in the history
…OSED TREE
  • Loading branch information
ncsoregi committed Feb 22, 2018
1 parent 1a3bbb3 commit f1e3649
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dom/media/FileBlockCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,7 @@ nsresult FileBlockCache::Read(int64_t aOffset,
// If the block is not yet written to file, we can just read from
// the memory buffer, otherwise we need to read from file.
int32_t bytesRead = 0;
MOZ_ASSERT(!mBlockChanges.IsEmpty());
MOZ_ASSERT(blockIndex < mBlockChanges.Length());
RefPtr<BlockChange> change = mBlockChanges.SafeElementAt(blockIndex);
RefPtr<BlockChange> change = mBlockChanges[blockIndex];
if (change && change->IsWrite()) {
// Block isn't yet written to file. Read from memory buffer.
const uint8_t* blockData = change->mData.get();
Expand All @@ -470,7 +468,7 @@ nsresult FileBlockCache::Read(int64_t aOffset,
// is resolved when MoveBlock() is called, and the move's source's
// block could be have itself been subject to a move (or write)
// which happened *after* this move was recorded.
blockIndex = change->mSourceBlockIndex;
blockIndex = mBlockChanges[blockIndex]->mSourceBlockIndex;
}
// Block has been written to file, either as the source block of a move,
// or as a stable (all changes made) block. Read the data directly
Expand Down

0 comments on commit f1e3649

Please sign in to comment.