Skip to content

Enable the port message queue in /workers/opaque-origin.html - #11189

Merged
zcorpan merged 1 commit into
masterfrom
zcorpan/workers-opaque-origin-flaky
May 30, 2018
Merged

zcorpan merged 1 commit into
masterfrom
zcorpan/workers-opaque-origin-flaky

Conversation

@zcorpan

@zcorpan zcorpan commented May 28, 2018

Copy link
Copy Markdown
Member

Fixes #11188.

@mkruisselbrink

Copy link
Copy Markdown
Contributor

Ah yes, good catch. Seems 39051c9 changed the RemoteContext code from assigning the event handler to onmessage to instead just calling addEventListener. I do wonder if it might not make more sense to add the start call to that code in RemoteContext though, rather than having to update all tests using fetch_tests_from_worker? At least it seems like SharedWorker would have the same problem, unless that is handled somewhere generically already?

@zcorpan

zcorpan commented May 30, 2018

Copy link
Copy Markdown
Member Author

create_remote_worker calls start() for service workers and shared workers, and otherwise assumes a dedicated worker. This test falls into the dedicated worker code path but needs start(). Do you think this is OK as-is or should we change create_remote_worker to call start() if it exists?

@mkruisselbrink

Copy link
Copy Markdown
Contributor

Ah, good point. So then it's only the fairly esoteric case of passing a raw MessagePort. We could add a separate if (is_message_port(worker)) case just for that, but given how uncommon this likely is I suppose we might as well do changes like this.

@zcorpan

zcorpan commented May 30, 2018

Copy link
Copy Markdown
Member Author

We can implement that if it becomes more common ☺

@zcorpan
zcorpan merged commit fa9e972 into master May 30, 2018
@foolip
foolip deleted the zcorpan/workers-opaque-origin-flaky branch July 17, 2018 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants