| 05:56 | <TimothyGu> | Domenic: so there's an interesting case here relating to `await` and the new EnqueuePromise change |
| 05:57 | <TimothyGu> | This shows up here (Chrome-only as Chrome's the only one that implements it) https://github.com/web-platform-tests/wpt/blob/master/wake-lock/wakelock-type.https.any.js |
| 05:58 | <TimothyGu> | essentially we have `await p` in the main frame, where `p` is a promise that comes from another frame that has since navigated away |
| 06:01 | <TimothyGu> | but `await` does a PromiseResolve on `p`, which due to arcane JavaScript rules actually treats `p` as a non-promise thenable. But `p.then` is from the frame that is no longer active, so `await` will never actually return |
| 06:02 | <TimothyGu> | On the other hand, `p.then(() => {})` works totally fine in the main frame, since the microtask is queued on the main frame. |
| 06:03 | <TimothyGu> | I guess the question is 0) does this sound right, given the current spec? and if so 1) is this behavior desirable? |
| 06:06 | <TimothyGu> | Actually I'm gonna file an issue |