[Webkit-unassigned] [Bug 160857] New: Promise API does not fully process microtask checkpoint: spec violation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 15 12:19:08 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160857
Bug ID: 160857
Summary: Promise API does not fully process microtask
checkpoint: spec violation
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: a at totic.org
Created attachment 286076
--> https://bugs.webkit.org/attachment.cgi?id=286076&action=review
This file will demonstrate the bug
Promises microtask queue does not fully process microtasks queued while microtask is running.
According to spec, microtask queue should loop until it is empty.
Why is this bug important?
Promises are often used by developers for scheduling. When they are,
developers assume Promise.resolve() means "execute this function right
after this script returns". This bug violates this promise.
FF/Edge/Chrome get this right. It'd be great if all browsers worked the same.
Example:
Promise.resolved()
.then(() => {
console.log("Promise 1");
return Promise.resolve();
})
.then(() => {
console.log("Promise 2");
}
window.setTimeout(function() {
console.log('timeout');
}, 0);
Might also be related to Bug #140043. I've attached a test case.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160815/75f73332/attachment.html>
More information about the webkit-unassigned
mailing list