summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Environment-setVariable-17.js
blob: bb09157b7d1eb88207dc5a3afd03ac3a7ba3f089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function f() {
    (function () {
        const otherDebugger = newGlobal({ sameZoneAs: this }).Debugger;
        const dbg = otherDebugger(this);

        const env = dbg.getNewestFrame().callee.environment;
        var ran = false;
        try {
            env.setVariable("tdz_variable", 10);
            ran = true;
        } catch (e) { }
        assertEq(ran, false);
    })();

    let tdz_variable = 10;
}
f();