Bug 1305791 - Clear result.mSegments if MoveFallible failed. r=billm

MozReview-Commit-ID: 8UaGt1OEfhh

--HG--
extra : rebase_source : c084812d2e4d8633d049638dcd55b0b97db2c603
This commit is contained in:
Kan-Ru Chen 2016-09-30 17:37:44 +08:00
parent eeb751d411
commit 3e934c8f5c

View File

@ -397,6 +397,7 @@ BufferList<AllocPolicy>::MoveFallible(bool* aSuccess, OtherAllocPolicy aAP)
if (!toAdvance || !result.mSegments.append(typename BufferList<OtherAllocPolicy>::Segment(iter.mData, toAdvance, toAdvance))) {
*aSuccess = false;
result.mSegments.clear();
return result;
}
iter.Advance(*this, toAdvance);