mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1286170 - Handle move-assignment of SourceBufferIterators correctly. r=edwin
This commit is contained in:
parent
a92a8b9e06
commit
da8a36ae22
@ -30,6 +30,22 @@ SourceBufferIterator::~SourceBufferIterator()
|
||||
}
|
||||
}
|
||||
|
||||
SourceBufferIterator&
|
||||
SourceBufferIterator::operator=(SourceBufferIterator&& aOther)
|
||||
{
|
||||
if (mOwner) {
|
||||
mOwner->OnIteratorRelease();
|
||||
}
|
||||
|
||||
mOwner = Move(aOther.mOwner);
|
||||
mState = aOther.mState;
|
||||
mData = aOther.mData;
|
||||
mChunkCount = aOther.mChunkCount;
|
||||
mByteCount = aOther.mByteCount;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
SourceBufferIterator::State
|
||||
SourceBufferIterator::AdvanceOrScheduleResume(IResumable* aConsumer)
|
||||
{
|
||||
|
@ -100,15 +100,7 @@ public:
|
||||
|
||||
~SourceBufferIterator();
|
||||
|
||||
SourceBufferIterator& operator=(SourceBufferIterator&& aOther)
|
||||
{
|
||||
mOwner = Move(aOther.mOwner);
|
||||
mState = aOther.mState;
|
||||
mData = aOther.mData;
|
||||
mChunkCount = aOther.mChunkCount;
|
||||
mByteCount = aOther.mByteCount;
|
||||
return *this;
|
||||
}
|
||||
SourceBufferIterator& operator=(SourceBufferIterator&& aOther);
|
||||
|
||||
/**
|
||||
* Returns true if there are no more than @aBytes remaining in the
|
||||
|
Loading…
Reference in New Issue
Block a user