blob: d694f849a69e14dacbeb845bc0af9b61f19b46cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Don't assert when a side-effect when getting the "then" property settled the promise.
function newPromiseCapability() {
var resolve, reject, promise = new Promise(function(r1, r2) {
resolve = r1;
reject = r2;
});
return {promise, resolve, reject};
}
var {promise, resolve} = newPromiseCapability();
var thenable = {
get then() {
settlePromiseNow(promise);
}
};
resolve(thenable);
|