summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug908915.js
blob: 2601facfe1e4d17cc85a33f4d732074ad8291596 (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
44
45
46
47
// |jit-test| error: 42; skip-if: getBuildConfiguration()['wasi']
load(libdir + "immutable-prototype.js");

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

var ignorelist = {
    'quit': true,
    'crash': true,
    'readline': true,
    'terminate': true,
    'nukeAllCCWs': true,
    'cacheIRHealthReport': true,
    'getInnerMostEnvironmentObject': true,
    'getEnclosingEnvironmentObject': true,
    'getEnvironmentObjectType' : true,
};

function f(y) {}
for (let e of Object.values(newGlobal())) {
    if (e.name in ignorelist)
	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 (b of Object.values(arr)) {
        if (b.name in ignorelist)
            continue;
        try {
            f(b)
        } catch (e) {}
    }
})();

throw 42;