summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/realms/bug1518821.js
blob: 03a217be8140379b283d04d5d0234c388d41c9a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
load(libdir + "asserts.js");

var g = newGlobal({newCompartment: true});
var f = g.Function("fn", "fn()");
f(function() {
    nukeAllCCWs();
    assertErrorMessage(() => { arguments.callee.caller = null; }, TypeError,
                       "can't access dead object");
    assertErrorMessage(() => arguments.callee.caller, TypeError,
                       "can't access dead object");
});