diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/promise/user-activation-propagation.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/promise/user-activation-propagation.js b/js/src/jit-test/tests/promise/user-activation-propagation.js new file mode 100644 index 0000000000..5ec28eb3a5 --- /dev/null +++ b/js/src/jit-test/tests/promise/user-activation-propagation.js @@ -0,0 +1,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); |