Bug 203882 - WindowEventLoop should be shared among similar origin documents
Summary: WindowEventLoop should be shared among similar origin documents
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: 202843
  Show dependency treegraph
 
Reported: 2019-11-06 01:02 PST by Ryosuke Niwa
Modified: 2019-11-22 04:47 PST (History)
9 users (show)

See Also:


Attachments
WIP (12.26 KB, patch)
2019-11-06 01:07 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch (15.28 KB, patch)
2019-11-06 16:50 PST, Ryosuke Niwa
wenson_hsieh: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2019-11-06 01:02:53 PST
Share WindowEventLoop amongst similar-origin window events as HTML5 spec says:
https://html.spec.whatwg.org/multipage/webappapis.html#window-event-loop
Comment 1 Ryosuke Niwa 2019-11-06 01:07:16 PST
Created attachment 382902 [details]
WIP
Comment 2 Radar WebKit Bug Importer 2019-11-06 16:46:38 PST
<rdar://problem/56965038>
Comment 3 Ryosuke Niwa 2019-11-06 16:50:25 PST
Created attachment 382985 [details]
Patch
Comment 4 Ryosuke Niwa 2019-11-07 12:07:03 PST
Ping reviewers
Comment 5 Wenson Hsieh 2019-11-07 12:17:41 PST
Comment on attachment 382985 [details]
Patch

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

> Source/WebCore/dom/WindowEventLoop.cpp:58
> +    ASSERT(windowEventLoopMap().contains(m_domain));

Do we need both this debug assert and the release assert below?

> LayoutTests/http/tests/eventloop/queue-task-across-cross-site-frames.html:22
> +    setTimeout(() => finishJSTest(), 3000);

I don’t think you meant to include this.
Comment 6 Ryosuke Niwa 2019-11-07 16:30:23 PST
(In reply to Wenson Hsieh from comment #5)
> Comment on attachment 382985 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=382985&action=review
> 
> > Source/WebCore/dom/WindowEventLoop.cpp:58
> > +    ASSERT(windowEventLoopMap().contains(m_domain));
> 
> Do we need both this debug assert and the release assert below?
> 
> > LayoutTests/http/tests/eventloop/queue-task-across-cross-site-frames.html:22
> > +    setTimeout(() => finishJSTest(), 3000);
> 
> I don’t think you meant to include this.

Oops these are added for debugging. Removed both.
Comment 7 Ryosuke Niwa 2019-11-07 17:13:21 PST
Committed r252221: <https://trac.webkit.org/changeset/252221>