WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
203960
Port MessagePort to the HTML5 event loop
https://bugs.webkit.org/show_bug.cgi?id=203960
Summary
Port MessagePort to the HTML5 event loop
Chris Dumez
Reported
2019-11-07 09:09:44 PST
Port MessagePort to the HTML5 event loop.
Attachments
Patch
(4.06 KB, patch)
2019-11-07 09:10 PST
,
Chris Dumez
rniwa
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-11-07 09:10:25 PST
Created
attachment 383055
[details]
Patch
Ryosuke Niwa
Comment 2
2019-11-07 14:04:22 PST
Comment on
attachment 383055
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383055&action=review
> Source/WebCore/dom/MessagePort.cpp:278 > - m_eventQueue->enqueueEvent(MessageEvent::create(WTFMove(ports), message.message.releaseNonNull())); > + queueTaskToDispatchEvent(*this, TaskSource::PostedMessage, MessageEvent::create(WTFMove(ports), message.message.releaseNonNull()));
Hm... the posted message task source is only used for window post message steps:
https://html.spec.whatwg.org/multipage/web-messaging.html#window-post-message-steps
https://html.spec.whatwg.org/multipage/web-messaging.html#posted-message-task-source
Shouldn't this be port message queue or unshipped port message queue?
https://html.spec.whatwg.org/multipage/web-messaging.html#port-message-queue
Chris Dumez
Comment 3
2019-11-07 14:07:06 PST
Comment on
attachment 383055
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383055&action=review
>> Source/WebCore/dom/MessagePort.cpp:278 >> + queueTaskToDispatchEvent(*this, TaskSource::PostedMessage, MessageEvent::create(WTFMove(ports), message.message.releaseNonNull())); > > Hm... the posted message task source is only used for window post message steps: >
https://html.spec.whatwg.org/multipage/web-messaging.html#window-post-message-steps
>
https://html.spec.whatwg.org/multipage/web-messaging.html#posted-message-task-source
> > Shouldn't this be port message queue or unshipped port message queue? >
https://html.spec.whatwg.org/multipage/web-messaging.html#port-message-queue
Looks like you're right, the spec says: "Add a task that runs the following steps to the port message queue of targetPort:" How do you propose I match the spec though?
Ryosuke Niwa
Comment 4
2019-11-07 14:09:15 PST
(In reply to Chris Dumez from
comment #3
)
> Comment on
attachment 383055
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=383055&action=review
> > >> Source/WebCore/dom/MessagePort.cpp:278 > >> + queueTaskToDispatchEvent(*this, TaskSource::PostedMessage, MessageEvent::create(WTFMove(ports), message.message.releaseNonNull())); > > > > Hm... the posted message task source is only used for window post message steps: > >
https://html.spec.whatwg.org/multipage/web-messaging.html#window-post-message-steps
> >
https://html.spec.whatwg.org/multipage/web-messaging.html#posted-message-task-source
> > > > Shouldn't this be port message queue or unshipped port message queue? > >
https://html.spec.whatwg.org/multipage/web-messaging.html#port-message-queue
> > Looks like you're right, the spec says: > "Add a task that runs the following steps to the port message queue of > targetPort:" > > How do you propose I match the spec though?
I think we just add TaskSource type of PostMessageQueue. Maybe add a comment saying that the spec says each port has its own task source but we coalesce into one. Because HTML5 event loop spec allows whatever task source to be picked, this is okay for our implementation.
Chris Dumez
Comment 5
2019-11-07 15:16:13 PST
Committed
r252209
: <
https://trac.webkit.org/changeset/252209
>
Radar WebKit Bug Importer
Comment 6
2019-11-07 15:17:19 PST
<
rdar://problem/57000643
>
Aakash Jain
Comment 7
2019-11-08 07:07:24 PST
(In reply to Chris Dumez from
comment #5
)
> Committed
r252209
: <
https://trac.webkit.org/changeset/252209
>
This likely caused layout Test fast/workers/worker-close-more.html to fail. Tracked in
https://bugs.webkit.org/show_bug.cgi?id=203995
Truitt Savell
Comment 8
2019-11-08 08:10:20 PST
(In reply to Aakash Jain from
comment #7
)
> (In reply to Chris Dumez from
comment #5
) > > Committed
r252209
: <
https://trac.webkit.org/changeset/252209
> > This likely caused layout Test fast/workers/worker-close-more.html to fail. > Tracked in
https://bugs.webkit.org/show_bug.cgi?id=203995
I was able to reproduce this by just running the test. It fails on 252209 but not on 252208
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug