Bug 1456147 - do not fail on an assertion error when calling Pickle::ExtractBuffers on an empty iterator; r=jld

MozReview-Commit-ID: 7m2QSOuxLOw

--HG--
extra : rebase_source : 776380e443647019f11e725a106f670adbb2c919
This commit is contained in:
Alex Gaynor 2018-04-23 11:20:07 -04:00
parent 639ed8fb3e
commit dcaebb1096

View File

@ -424,7 +424,7 @@ bool Pickle::ExtractBuffers(PickleIterator* iter, size_t length, BufferList* buf
DCHECK(alignment == 4 || alignment == 8);
DCHECK(intptr_t(header_) % alignment == 0);
if (AlignInt(length) < length) {
if (AlignInt(length) < length || iter->iter_.Done()) {
return false;
}