Chromium Code Reviews| Index: content/browser/shared_worker/shared_worker_host.cc |
| diff --git a/content/browser/shared_worker/shared_worker_host.cc b/content/browser/shared_worker/shared_worker_host.cc |
| index bf7767efbabcd8bf0a66238ee1cf85beb1f48c5e..53affd16055577f8893b0ddcce312bac7bda7cb3 100644 |
| --- a/content/browser/shared_worker/shared_worker_host.cc |
| +++ b/content/browser/shared_worker/shared_worker_host.cc |
| @@ -132,6 +132,19 @@ void SharedWorkerHost::DocumentDetached(SharedWorkerMessageFilter* filter, |
| } |
| } |
| +void SharedWorkerHost::RenderFrameDetached(int render_process_id, |
| + int render_frame_id) { |
| + if (!instance_) |
| + return; |
| + // Walk all instances and remove the all documents in the frame from their |
|
nhiroki
2016/08/25 09:38:19
all the documents
horo
2016/08/25 10:55:55
Done.
|
| + // document set. |
| + worker_document_set_->RemoveRenderFrame(render_process_id, render_frame_id); |
| + if (worker_document_set_->IsEmpty()) { |
| + // This worker has no more associated documents - shut it down. |
| + TerminateWorker(); |
| + } |
| +} |
| + |
| void SharedWorkerHost::WorkerContextClosed() { |
| if (!instance_) |
| return; |