summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/promise/user-activation-propagation.js
blob: 5ec28eb3a560af60340cdbe05d14de5607f652f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function newPromiseCapability() {
    return {};
}
function neverCalled() {}
function resolveCapability(dIs) {}
class P extends Promise {
    constructor(executor) {
        executor(resolveCapability, neverCalled);
        var p = async function() {}();
        p.constructor = {
            [Symbol.species]: P
        };
        return p;
    }
}
var {
    promise: alwaysPending
} = newPromiseCapability();
P.race([alwaysPending]).then(neverCalled, neverCalled);