summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/define-frozen-property-strict.js
blob: 7e2b2d818b458780a1cb44921e685267f59f4c9c (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.c = 10;
  } catch(e) {
    ok = true;
  }
  assertEq(ok, true);
  assertEq(x.c, undefined);
}
x = {a:0,b:1};
Object.freeze(x);
foo(x);