summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug908915.js
blob: f5a4dc43c37a8fb4b3f77a75af812a8e2020cf11 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// |jit-test| error: 42
load(libdir + "immutable-prototype.js");

// Suppress the large quantity of output on stdout (eg from calling
// dumpHeap()).
os.file.redirect(null);

var blacklist = {
    'quit': true,
    'crash': true,
    'readline': true,
    'terminate': true,
    'nestedShell': true,
};

function f(y) {}
for each(let e in newGlobal()) {
    if (e.name in blacklist)
	continue;
    print(e.name);
    try {
        e();
    } catch (r) {}
}
(function() {
    arguments;
    if (globalPrototypeChainIsMutable())
        Object.prototype.__proto__ = newGlobal()
    function f(y) {
        y()
    }
    var arr = [];
    arr.__proto__ = newGlobal();
    for each (b in arr) {
        if (b.name in blacklist)
            continue;
        try {
            f(b)
        } catch (e) {}
    }
})();

throw 42;