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

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

Issue 1342733002: ServiceWorker: log when the script's loaded separately from thread start (chromium) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fix Created 5 years, 3 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 bf268e8bedc8aa7e210a933d13b981604758d653..f20dd2224859ef39f457d12a793d61b5d72c1d99 100644
--- a/content/browser/service_worker/embedded_worker_registry.cc
+++ b/content/browser/service_worker/embedded_worker_registry.cc
@@ -79,16 +79,25 @@ void EmbeddedWorkerRegistry::OnWorkerReadyForInspection(
found->second->OnReadyForInspection();
}
-void EmbeddedWorkerRegistry::OnWorkerScriptLoaded(
- int process_id,
- int thread_id,
- int embedded_worker_id ) {
+void EmbeddedWorkerRegistry::OnWorkerScriptLoaded(int process_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(thread_id);
+ found->second->OnScriptLoaded();
+}
+
+void EmbeddedWorkerRegistry::OnWorkerThreadStarted(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->OnThreadStarted(thread_id);
}
void EmbeddedWorkerRegistry::OnWorkerScriptLoadFailed(int process_id,

Powered by Google App Engine
This is Rietveld 408576698