зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1240521 - IonBuilder processSwitchEnd returns ControlStatus_Error on allocation errors. r=h4writer
This commit is contained in:
Родитель
1996b83ba5
Коммит
a7ff33a68b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче