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

Unified Diff: content/browser/service_worker/embedded_worker_registry.cc

Issue 931173002: Implement EmbeddedWorkerContextClient.setCachedMetadata/clearCachedMetadata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix clang failure Created 5 years, 10 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
Index: content/browser/service_worker/embedded_worker_registry.cc
diff --git a/content/browser/service_worker/embedded_worker_registry.cc b/content/browser/service_worker/embedded_worker_registry.cc
index fa8197a4159bf7354aafa5e76a44693218788152..5d37d359d35279eba335554eed41349d0f934369 100644
--- a/content/browser/service_worker/embedded_worker_registry.cc
+++ b/content/browser/service_worker/embedded_worker_registry.cc
@@ -48,13 +48,14 @@ ServiceWorkerStatusCode EmbeddedWorkerRegistry::StopWorker(
new EmbeddedWorkerMsg_StopWorker(embedded_worker_id));
}
-bool EmbeddedWorkerRegistry::OnMessageReceived(const IPC::Message& message) {
+bool EmbeddedWorkerRegistry::OnMessageReceived(const IPC::Message& message,
+ int process_id) {
// TODO(kinuko): Move all EmbeddedWorker message handling from
// ServiceWorkerDispatcherHost.
WorkerInstanceMap::iterator found = worker_map_.find(message.routing_id());
DCHECK(found != worker_map_.end());
- if (found == worker_map_.end())
+ if (found == worker_map_.end() || found->second->process_id() != process_id)
return false;
return found->second->OnMessageReceived(message);
}

Powered by Google App Engine
This is Rietveld 408576698