[Webkit-unassigned] [Bug 198643] New: async function resolution order
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 6 21:29:07 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=198643
Bug ID: 198643
Summary: async function resolution order
Product: WebKit
Version: Safari 12
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: johnplaisted at google.com
Created attachment 371556
--> https://bugs.webkit.org/attachment.cgi?id=371556&action=review
Test demonstrating differences in async / promise behavior
Steps to reproduce:
The await keyword has a different resolution order than Promises, which seems incorrect (and fwiw Chrome's await matches promises; FireFox appears to share Safari's behavior).
I think I've found two different cases where the order is different from promises:
In some cases the await order determines when functions continue (rather than the resolve() order, assuming things resolve synchronously)
In some other cases it seems to be the opposite of the resolve AND await order when the are the same order. Maybe it is because one is an await <literal> and the other is an await promise?
Actual results:
The order of asynchronous code with an async function doesn't match the equivalent promise code.
When running the file:
async test fails
promise test passes
order of await determines order of async callbacks
order resolve() determines order of promise callbacks
Expected results:
The async function order matches the Promise equivalent.
When running the file:
async test passes
promise test passes
order of resolve() determines order of async callbacks
order resolve() determines order of promise callbacks
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190607/7956d207/attachment.html>
More information about the webkit-unassigned
mailing list