Bug 1231925 - Correctly recover if allocating tracked optimizations go OOM. (r=jonco)

This commit is contained in:
Shu-yu Guo 2015-12-16 17:07:23 -08:00
parent 94e9d75b26
commit f0b829c1ca
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,7 @@
if (!('oomTest' in this))
quit();
enableSPSProfiling();
oomTest(function() {
eval("(function() {})()")
});

View File

@ -8217,6 +8217,8 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints)
(const IonTrackedOptimizationsAttemptsTable*) optsAttemptsTableAddr;
entry.initTrackedOptimizations(optsRegionTable, optsTypesTable, optsAttemptsTable,
allTypes);
} else {
cx->recoverFromOutOfMemory();
}
}