Properly 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 Review URL: https://codereview.chromium.org/737833002 Cr-Commit-Position: refs/heads/master@{#305120}
Showing
Please register or sign in to comment