diff --git a/js/src/jit-test/tests/ion/bug913749.js b/js/src/jit-test/tests/ion/bug913749.js new file mode 100644 index 00000000000..715483f7d3f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug913749.js @@ -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"); + } +} diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 905aa71f159..6274a8257c7 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -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;