mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 913749 - Mark fallible unbox instructions as guards. r=h4writer
--HG-- extra : rebase_source : f064535983782dcd52791f977f16a21d83603381
This commit is contained in:
parent
fb71c14bd1
commit
67b63c129d
20
js/src/jit-test/tests/ion/bug913749.js
Normal file
20
js/src/jit-test/tests/ion/bug913749.js
Normal file
@ -0,0 +1,20 @@
|
||||
y = Float32Array(11);
|
||||
x = [];
|
||||
|
||||
Object.defineProperty(x, 18, {
|
||||
get: (function() {
|
||||
y.length;
|
||||
}),
|
||||
});
|
||||
this.toSource();
|
||||
|
||||
y = undefined;
|
||||
|
||||
for (var i = 0; i < 3; i++) {
|
||||
try {
|
||||
x.toString();
|
||||
assertEq(0, 1);
|
||||
} catch (e) {
|
||||
assertEq(e.message, "y is undefined");
|
||||
}
|
||||
}
|
@ -2197,7 +2197,7 @@ class MUnbox : public MUnaryInstruction, public BoxInputsPolicy
|
||||
setResultTypeSet(ins->resultTypeSet());
|
||||
setMovable();
|
||||
|
||||
if (mode_ == TypeBarrier)
|
||||
if (mode_ == TypeBarrier || mode_ == Fallible)
|
||||
setGuard();
|
||||
|
||||
bailoutKind_ = kind;
|
||||
|
Loading…
Reference in New Issue
Block a user