diff options
author | falken <falken@chromium.org> | 2014-11-06 21:02:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-07 05:02:38 +0000 |
commit | dd4c8043fcb65e523f59e0b6e30fba322bf4c4f0 (patch) | |
tree | 53ecc81451d17599ff9d57bec5c52097a74a09e3 /remoting/remoting_host.gypi | |
parent | 9da298e189db8751ca75039d4db49e9d5dab7247 (diff) | |
download | chromium_src-dd4c8043fcb65e523f59e0b6e30fba322bf4c4f0.zip chromium_src-dd4c8043fcb65e523f59e0b6e30fba322bf4c4f0.tar.gz chromium_src-dd4c8043fcb65e523f59e0b6e30fba322bf4c4f0.tar.bz2 |
Service Worker: Cleanup on a renderer crash before the dispatcher host is destroyed
This fixes a broken state that can occur when a render process crashes but its
corresponding ServiceWorkerDispatcherHost does not get destructed immediately after.
That can happen if something holds a reference to the ServiceWorkerDispatcherHost,
for example, if it's waiting for a result from a ServiceWorkerRegisterJob.
This patch:
1) Has ServiceWorkerDispatcherHost tear down state associated with its render process
in OnFilterRemoved instead of in its destructor. This is needed because the browser
will create a new ServiceWorkerDispatcherHost when reusing the render process host
(yes it can reuse the RPH! see comment in RenderProcessHostImpl::ProcessDied():
"This object is not deleted at this point and might be reused later."), but the
old one may not have been destructed yet if something holds a reference to it.
2) Allows ServiceWorkerVersion::Start to call its callback with failure if the
render process crashed before the embedded worker could start up. It does this
by immediately inserting a starting worker in the EmbeddedWorkerRegistry, instead
of waiting for start to complete. Now, on a renderer crash, when
ServiceWorkerDispatcherHost tears down state, the registry will call OnStopped on
both starting and running embedded workers in that process.
This makes it less likely for ServiceWorkerRegisterJob to hang indefinitely,
though it's still possible with crbug.com/404111.
BUG=428463
Review URL: https://codereview.chromium.org/705013003
Cr-Commit-Position: refs/heads/master@{#303189}
Diffstat (limited to 'remoting/remoting_host.gypi')
0 files changed, 0 insertions, 0 deletions