Bug 1362761 : Remove Compact from NIGHTLY build for debug purpose. r=francois

We suspect nsTArray Compact may cause a crash issue during SafeBrowsing
update. Temporarily remove it from NIGHTLY build, if crash still shows
at NIGHTLY build, we will restore it back.

MozReview-Commit-ID: 2wjbMykEbJ8

--HG--
extra : rebase_source : 1be0d12e9d1de7f249c509cfa016bb26242cbdc7
This commit is contained in:
DimiL 2017-10-11 16:56:06 +08:00
parent 196932affd
commit 0327430fc7

View File

@ -117,7 +117,10 @@ nsUrlClassifierPrefixSet::MakePrefixSet(const uint32_t* aPrefixes, uint32_t aLen
// Compact the previous element.
// Note there is always at least one element when we get here,
// because we created the first element before the loop.
// Bug 1362761 : Remove Compact from NIGHTLY build for debug purpose
#ifndef NIGHTLY_BUILD
mIndexDeltas.LastElement().Compact();
#endif
if (!mIndexDeltas.AppendElement(fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
@ -139,9 +142,12 @@ nsUrlClassifierPrefixSet::MakePrefixSet(const uint32_t* aPrefixes, uint32_t aLen
previousItem = aPrefixes[i];
}
// Bug 1362761 : Remove Compact from NIGHTLY build for debug purpose
#ifndef NIGHTLY_BUILD
mIndexDeltas.LastElement().Compact();
mIndexDeltas.Compact();
mIndexPrefixes.Compact();
#endif
LOG(("Total number of indices: %d", aLength));
LOG(("Total number of deltas: %d", totalDeltas));