In Safari 10, Safari Technology Preview and Webkit Nightly Build behavour of native Promise object changed from that one in Safari 9. Now during microtasks execution there are unnecessary UI updates. This change can break existing codebase because all (latest Chrome, FireFox, IE, Edge) browsers that support Promise object behaves correctly. Even promise polyfill in checked browsers (IE9, Android 4 Browser) works correctly. I assume that this is very critical bug in Safari 10 that breaks down compatibility with another browsers. Issue can be reproduced in https://jsfiddle.net/Lo7utx4s/ . Clicking on 'TEST PROMISE BEHAVIOR' should not cause blue rectangle blinks with white or black.
Regressed in https://trac.webkit.org/changeset/193286
<rdar://problem/28062149>
This causes setTimeout to fire before promises in some cases. Demo: http://output.jsbin.com/xenumo/quiet
Created attachment 300971 [details] Patch
Comment on attachment 300971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=300971&action=review r=me > Source/WebCore/dom/Microtasks.cpp:81 > + Vector<std::unique_ptr<Microtask>> toKeep; > + do { I think this would be better as a while loop, since the queue can be initially empty at a checkpoint, right?
Mac bot: Regressions: Unexpected text-only failures (4) imported/w3c/web-platform-tests/custom-elements/adopted-callback.html [ Failure ] imported/w3c/web-platform-tests/custom-elements/upgrading.html [ Failure ] imported/w3c/web-platform-tests/html/webappapis/scripting/event-loops/microtask_after_script.html [ Failure ] js/dom/modules/module-incorrect-relative-specifier.html [ Failure ]
Comment on attachment 300971 [details] Patch Attachment 300971 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3027786 New failing tests: imported/w3c/web-platform-tests/html/webappapis/scripting/event-loops/microtask_after_script.html imported/w3c/web-platform-tests/custom-elements/upgrading.html js/dom/modules/module-incorrect-relative-specifier.html imported/w3c/web-platform-tests/custom-elements/adopted-callback.html
Created attachment 300976 [details] Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 300978 [details] Patch
Committed r211913: <http://trac.webkit.org/changeset/211913>
This change may have caused: https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/r211913%20(3409)/http/tests/misc/module-absolute-url-pretty-diff.html
(In reply to comment #11) > This change may have caused: > https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/ > r211913%20(3409)/http/tests/misc/module-absolute-url-pretty-diff.html I'll land the fix for that.
Committed r211968: <http://trac.webkit.org/changeset/211968>
It also looks like it caused http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html to fail: https://build.webkit.org/results/Apple%20iOS%2010%20Simulator%20Release%20WK2%20(Tests)/r211961%20(3594)/http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes-pretty-diff.html
I would suspect r211963 for that.
(In reply to comment #15) > I would suspect r211963 for that. Flakiness dashboard suggests that it happened between these changes: https://trac.webkit.org/log/?verbose=on&rev=211915&stop_rev=211913 https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fcache%2Fdisk-cache%2Fdisk-cache-remove-several-pending-writes.html