Bug 1216607 - Fix assertion failure ARM assembler on OOM r=jandem

This commit is contained in:
Jon Coppeard 2015-10-26 10:16:51 +00:00
parent 1a5fb5ffcd
commit a17d33df4f
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,16 @@
enableSPSProfilingWithSlowAssertions();
try {
(function() {
while (n--) {
}
})();
} catch(exc1) {}
function arrayProtoOutOfRange() {
function f(obj) {}
function test() {
for (var i = 0; i < 1000; i++)
var r = f(i % 2 ? a : b);
}
test();
}
oomTest(arrayProtoOutOfRange);

View File

@ -168,7 +168,7 @@ class CompactBufferWriter
}
void writeNativeEndianUint32_t(uint32_t value) {
// Must be at 4-byte boundary
MOZ_ASSERT(length() % sizeof(uint32_t) == 0);
MOZ_ASSERT_IF(!oom(), length() % sizeof(uint32_t) == 0);
writeFixedUint32_t(0);
if (oom())
return;