Bug 943505 - Use fallible allocation in nsZipItemPtr_base::nsZipItemPtr_base. r=bsmedberg

This commit is contained in:
Peiyong Lin 2013-12-11 14:14:03 -05:00
parent fcec562803
commit e6cca8fcf7

View File

@ -1128,7 +1128,10 @@ nsZipItemPtr_base::nsZipItemPtr_base(nsZipArchive *aZip, const char * aEntryName
uint32_t size = 0;
if (item->Compression() == DEFLATED) {
size = item->RealSize();
mAutoBuf = new uint8_t[size];
mAutoBuf = new ((fallible_t())) uint8_t[size];
if (!mAutoBuf) {
return;
}
}
nsZipCursor cursor(item, aZip, mAutoBuf, size, doCRC);