REGRESSION (r193286): Promise chain no longer prevent UI refresh
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2017 01:42:55 +0000 (01:42 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2017 01:42:55 +0000 (01:42 +0000)
commitf351f0c77acfac45bf80c8e890d194e5ceb5acbd
tree3fd645a873a22e12ce517146ca6fd2a8a2568264
parent90c1d6d88fe4e98aad3f2d6b329b2f6d0babe8dd
REGRESSION (r193286): Promise chain no longer prevent UI refresh
<rdar://problem/28062149>
https://bugs.webkit.org/show_bug.cgi?id=161291

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

* web-platform-tests/custom-elements/adopted-callback-expected.txt:
* web-platform-tests/custom-elements/upgrading-expected.txt:
* web-platform-tests/html/webappapis/scripting/event-loops/microtask_after_script-expected.txt:
Update results for improved promise support.

Source/WebCore:

Add new subtest to js/dom/Promise.html

* dom/Microtasks.cpp:
(WebCore::MicrotaskQueue::append):
(WebCore::MicrotaskQueue::remove):
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
* dom/Microtasks.h:
The microtask queue needs to be completely drained, even of new microtasks added while
the previous task was run. Remove the m_tasksAppendedDuringMicrotaskCheckpoint as it is
no longer needed.

LayoutTests:

* js/dom/Promise.html:
Add a new subtest that ensures the ordering of multiple thenables and a setTimeout.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@211913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/custom-elements/adopted-callback-expected.txt
LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/event-loops/microtask_after_script-expected.txt
LayoutTests/js/dom/Promise.html
LayoutTests/js/dom/modules/module-incorrect-relative-specifier-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/Microtasks.cpp
Source/WebCore/dom/Microtasks.h