Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1238)

Unified Diff: content/browser/shared_worker/shared_worker_service_impl.cc

Issue 2614013004: SharedWorker: Document lifetime of SharedWorkerHost (Closed)
Patch Set: move Send() to 'private' section Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/shared_worker/shared_worker_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 28d180441df6517c270fd036de166daf619dd284..2bdc277d333cdd34371a5779a9fa4a3e86d9ebaf 100644
--- a/content/browser/shared_worker/shared_worker_service_impl.cc
+++ b/content/browser/shared_worker/shared_worker_service_impl.cc
@@ -278,7 +278,7 @@ std::vector<WorkerService::WorkerInfo> SharedWorkerServiceImpl::GetWorkers() {
info.name = instance->name();
info.route_id = host->worker_route_id();
info.process_id = host->process_id();
- info.handle = host->container_render_filter()->PeerHandle();
+ info.handle = host->worker_render_filter()->PeerHandle();
results.push_back(info);
}
}
@@ -362,11 +362,7 @@ void SharedWorkerServiceImpl::WorkerContextDestroyed(
SharedWorkerMessageFilter* filter) {
ScopedWorkerDependencyChecker checker(this);
ProcessRouteIdPair key(filter->render_process_id(), worker_route_id);
- if (!base::ContainsKey(worker_hosts_, key))
- return;
- std::unique_ptr<SharedWorkerHost> host(worker_hosts_[key].release());
worker_hosts_.erase(key);
- host->WorkerContextDestroyed();
}
void SharedWorkerServiceImpl::WorkerReadyForInspection(
« no previous file with comments | « content/browser/shared_worker/shared_worker_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698