Index: content/browser/shared_worker/shared_worker_service_impl.cc |
diff --git a/content/browser/shared_worker/shared_worker_service_impl.cc b/content/browser/shared_worker/shared_worker_service_impl.cc |
index e48add9263e453184df2c7697c2c552ca50d66af..d06cec1dfb7501ca9f0563abc7437b1ed2141277 100644 |
--- a/content/browser/shared_worker/shared_worker_service_impl.cc |
+++ b/content/browser/shared_worker/shared_worker_service_impl.cc |
@@ -287,8 +287,17 @@ void SharedWorkerServiceImpl::OnSharedWorkerMessageFilterClosing( |
if (iter->first.first == filter->render_process_id()) |
remove_list.push_back(iter->first); |
} |
- for (size_t i = 0; i < remove_list.size(); ++i) |
- worker_hosts_.erase(remove_list[i]); |
+ for (size_t i = 0; i < remove_list.size(); ++i) { |
+ scoped_ptr<SharedWorkerHost> host = |
+ worker_hosts_.take_and_erase(remove_list[i]); |
+ } |
+} |
+ |
+void SharedWorkerServiceImpl::NotifyWorkerDestroyed(int worker_process_id, |
+ int worker_route_id) { |
+ FOR_EACH_OBSERVER(WorkerServiceObserver, |
+ observers_, |
+ WorkerDestroyed(worker_process_id, worker_route_id)); |
} |
SharedWorkerHost* SharedWorkerServiceImpl::FindSharedWorkerHost( |