mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1240521 - IonBuilder processSwitchEnd returns ControlStatus_Error on allocation errors. r=h4writer
This commit is contained in:
parent
1996b83ba5
commit
a7ff33a68b
13
js/src/jit-test/tests/ion/bug1240521.js
Normal file
13
js/src/jit-test/tests/ion/bug1240521.js
Normal file
@ -0,0 +1,13 @@
|
||||
// |jit-test| allow-oom
|
||||
var egc = 138;
|
||||
function SwitchTest(value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
break
|
||||
case new Number:
|
||||
result = 8
|
||||
case oomAfterAllocations(egc):
|
||||
}
|
||||
}
|
||||
!(SwitchTest(4) === 4);
|
||||
!(SwitchTest(true) === 2);
|
@ -3054,7 +3054,7 @@ IonBuilder::processSwitchEnd(DeferredEdge* breaks, jsbytecode* exitpc)
|
||||
successor = newBlock(current, exitpc);
|
||||
|
||||
if (!successor)
|
||||
return ControlStatus_Ended;
|
||||
return ControlStatus_Error;
|
||||
|
||||
// If there is current, the current block flows into this one.
|
||||
// So current is also a predecessor to this block
|
||||
|
Loading…
Reference in New Issue
Block a user