DescriptionProperly queue messages sent to message ports that are transferred to a service worker.
There can be some delay between the message port being transferred to the
browser process and the renderer for the service worker being available, so
this change makes sure that during this period messages sent to these message
ports are queued, rather than get lost/cause assertions to fail.
Additionally, ports that are send to these ports while they are queued will be similarly delayed, and thus also need to be put in this special state.
Finally when for some reason launching the service worker fails all these ports (that are not associated with any renderer) need to be cleaned up, which might have to happen asynchronously, since the source renderer process might not have finished sending the message queue for this port yet.
Some layout tests for this are in https://codereview.chromium.org/729923004/
BUG=432678
Committed: https://crrev.com/ddb153288a99ad6be14b88244bfa070e612580f9
Cr-Commit-Position: refs/heads/master@{#305120}
Patch Set 1 #Patch Set 2 : more complete fix #Patch Set 3 : better cleanup in case of errors #
Total comments: 2
Patch Set 4 : rebase #Patch Set 5 : improve comment #
Total comments: 2
Patch Set 6 : format and comment #
Messages
Total messages: 17 (7 generated)
|