summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/write-frozen-property-strict.js
blob: c9c40276129b53f54de06ecbd11065e5844c4464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function foo(x) {
  "use strict";
  var ok = false;
  try {
    x.a = 10;
  } catch(e) {
    ok = true;
  }
  assertEq(ok, true);
  assertEq(x.a, 0);
}
x = {a:0,b:1};
Object.freeze(x);
foo(x);