Bug 204546 - Perform microtask checkpoint after each task as spec'ed
Summary: Perform microtask checkpoint after each task as spec'ed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 204042
  Show dependency treegraph
 
Reported: 2019-11-22 21:59 PST by Ryosuke Niwa
Modified: 2019-12-03 21:22 PST (History)
10 users (show)

See Also:


Attachments
Patch (16.42 KB, patch)
2019-11-23 00:20 PST, Ryosuke Niwa
cdumez: review+
Details | Formatted Diff | Diff
Archive of layout-test-results from ews213 for win-future (14.47 MB, application/zip)
2019-11-23 02:09 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2019-11-22 21:59:09 PST
Implement the processing model of the HTML5 event loop to perform a microtask checkpoint after performing tasks's steps:
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model
Comment 1 Radar WebKit Bug Importer 2019-11-22 21:59:37 PST
<rdar://problem/57449333>
Comment 2 Ryosuke Niwa 2019-11-23 00:20:40 PST
Created attachment 384232 [details]
Patch
Comment 3 EWS Watchlist 2019-11-23 02:09:14 PST
Comment on attachment 384232 [details]
Patch

Attachment 384232 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/13274794

New failing tests:
svg/as-image/svg-nested.html
Comment 4 EWS Watchlist 2019-11-23 02:09:17 PST
Created attachment 384235 [details]
Archive of layout-test-results from ews213 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews213  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 5 Ryosuke Niwa 2019-12-03 15:30:07 PST
Comment on attachment 384232 [details]
Patch

Ping reviewers.
Comment 6 Chris Dumez 2019-12-03 16:43:30 PST
Comment on attachment 384232 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384232&action=review

> Source/WebCore/dom/EventLoop.cpp:85
> +        m_groupsWithSuspenedTasks.clear();

typo: m_groupsWithSuspenedTasks -> m_groupsWithSuspendedTasks

> Source/WebCore/testing/Internals.h:780
> +    ExceptionOr<void> queueMicrotaskInTask(Document&, const String& source, RefPtr<VoidCallback>&&);

Kind of a strange name IMHO.
Comment 7 Ryosuke Niwa 2019-12-03 18:03:20 PST
(In reply to Chris Dumez from comment #6)
> Comment on attachment 384232 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=384232&action=review
> 
> > Source/WebCore/dom/EventLoop.cpp:85
> > +        m_groupsWithSuspenedTasks.clear();
> 
> typo: m_groupsWithSuspenedTasks -> m_groupsWithSuspendedTasks
> 
> > Source/WebCore/testing/Internals.h:780
> > +    ExceptionOr<void> queueMicrotaskInTask(Document&, const String& source, RefPtr<VoidCallback>&&);
> 
> Kind of a strange name IMHO.

How about queueTaskToQueueMicrotask?
Comment 8 Chris Dumez 2019-12-03 18:05:04 PST
(In reply to Ryosuke Niwa from comment #7)
> (In reply to Chris Dumez from comment #6)
> > Comment on attachment 384232 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=384232&action=review
> > 
> > > Source/WebCore/dom/EventLoop.cpp:85
> > > +        m_groupsWithSuspenedTasks.clear();
> > 
> > typo: m_groupsWithSuspenedTasks -> m_groupsWithSuspendedTasks
> > 
> > > Source/WebCore/testing/Internals.h:780
> > > +    ExceptionOr<void> queueMicrotaskInTask(Document&, const String& source, RefPtr<VoidCallback>&&);
> > 
> > Kind of a strange name IMHO.
> 
> How about queueTaskToQueueMicrotask?

I like this better. It makes it clearer what the implementation actually does.
Comment 9 Ryosuke Niwa 2019-12-03 21:22:05 PST
Committed r253091: <https://trac.webkit.org/changeset/253091>