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

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

Issue 489253002: Allow the browser to Send messages to an embedded worker once the script as been loaded without hav… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 93743ee400aa0e03b9e60086622a7364c48f949b..15ca3b1c2fe5cc94e3246331626318d60ed82161 100644
--- a/content/browser/service_worker/embedded_worker_registry.cc
+++ b/content/browser/service_worker/embedded_worker_registry.cc
@@ -78,14 +78,16 @@ void EmbeddedWorkerRegistry::OnWorkerReadyForInspection(
found->second->OnReadyForInspection();
}
-void EmbeddedWorkerRegistry::OnWorkerScriptLoaded(int process_id,
- int embedded_worker_id) {
+void EmbeddedWorkerRegistry::OnWorkerScriptLoaded(
+ int process_id,
+ int thread_id,
+ int embedded_worker_id ) {
WorkerInstanceMap::iterator found = worker_map_.find(embedded_worker_id);
DCHECK(found != worker_map_.end());
DCHECK_EQ(found->second->process_id(), process_id);
if (found == worker_map_.end() || found->second->process_id() != process_id)
return;
- found->second->OnScriptLoaded();
+ found->second->OnScriptLoaded(thread_id);
}
void EmbeddedWorkerRegistry::OnWorkerScriptLoadFailed(int process_id,
@@ -99,7 +101,7 @@ void EmbeddedWorkerRegistry::OnWorkerScriptLoadFailed(int process_id,
}
void EmbeddedWorkerRegistry::OnWorkerStarted(
- int process_id, int thread_id, int embedded_worker_id) {
+ int process_id, int embedded_worker_id) {
DCHECK(!ContainsKey(worker_process_map_, process_id) ||
worker_process_map_[process_id].count(embedded_worker_id) == 0);
WorkerInstanceMap::iterator found = worker_map_.find(embedded_worker_id);
@@ -108,7 +110,7 @@ void EmbeddedWorkerRegistry::OnWorkerStarted(
if (found == worker_map_.end() || found->second->process_id() != process_id)
return;
worker_process_map_[process_id].insert(embedded_worker_id);
- found->second->OnStarted(thread_id);
+ found->second->OnStarted();
}
void EmbeddedWorkerRegistry::OnWorkerStopped(

Powered by Google App Engine
This is Rietveld 408576698