summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-eval-25.js
blob: cc91b28587f95206e90a7cabfb2aa5c9be4973d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Make sure we can recover missing arguments even when it gets assigned to
// another slot.

load(libdir + "asserts.js");
load(libdir + "evalInFrame.js");

function h() {
  evalInFrame(1, "a.push(0)");
}

function f() {
  var a = arguments;
  h();
}

assertThrowsInstanceOf(f, TypeError);

function g() {
  {
    let a = arguments;
    h();
  }
}

assertThrowsInstanceOf(g, TypeError);