RESOLVED FIXED Bug 161291
REGRESSION (r193286): Promise chain no longer prevent UI refresh
https://bugs.webkit.org/show_bug.cgi?id=161291
Summary REGRESSION (r193286): Promise chain no longer prevent UI refresh
Kvet
Reported 2016-08-27 09:27:25 PDT
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.
Attachments
Patch (5.59 KB, patch)
2017-02-08 14:57 PST, Sam Weinig
no flags
Archive of layout-test-results from ews103 for mac-elcapitan (968.71 KB, application/zip)
2017-02-08 15:36 PST, Build Bot
no flags
Patch (9.89 KB, patch)
2017-02-08 15:52 PST, Sam Weinig
no flags
Alexey Proskuryakov
Comment 1 2016-08-29 13:53:55 PDT
Radar WebKit Bug Importer
Comment 2 2016-08-29 13:54:39 PDT
Jake Archibald
Comment 3 2017-02-08 08:24:18 PST
This causes setTimeout to fire before promises in some cases. Demo: http://output.jsbin.com/xenumo/quiet
Sam Weinig
Comment 4 2017-02-08 14:57:14 PST
Geoffrey Garen
Comment 5 2017-02-08 15:02:17 PST
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?
Geoffrey Garen
Comment 6 2017-02-08 15:13:39 PST
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 ]
Build Bot
Comment 7 2017-02-08 15:35:59 PST
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
Build Bot
Comment 8 2017-02-08 15:36:04 PST
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
Sam Weinig
Comment 9 2017-02-08 15:52:17 PST
Sam Weinig
Comment 10 2017-02-08 17:44:27 PST
Yusuke Suzuki
Comment 12 2017-02-09 10:12:48 PST
(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.
Yusuke Suzuki
Comment 13 2017-02-09 10:17:32 PST
Ryan Haddad
Comment 14 2017-02-09 10:23:28 PST
Antti Koivisto
Comment 15 2017-02-09 11:43:53 PST
I would suspect r211963 for that.
Note You need to log in before you can comment on or make changes to this bug.