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

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

Issue 252633003: Introduce worker_devtools_agent_route_id for EmbeddedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated kinuko's comment Created 6 years, 8 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_instance.cc
diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
index 6ee4356e6797705b5d6cb933b6bcf95570ebec79..09bd0478aacbec1b89758d9349077a4cc3c0181c 100644
--- a/content/browser/service_worker/embedded_worker_instance.cc
+++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -28,10 +28,12 @@ ServiceWorkerStatusCode EmbeddedWorkerInstance::Start(
embedded_worker_id_,
service_worker_version_id,
scope,
- script_url);
+ script_url,
+ &worker_devtools_agent_route_id_);
if (status != SERVICE_WORKER_OK) {
status_ = STOPPED;
process_id_ = -1;
+ worker_devtools_agent_route_id_ = MSG_ROUTING_NONE;
}
return status;
}
@@ -70,14 +72,14 @@ void EmbeddedWorkerInstance::ReleaseProcessReference(int process_id) {
process_refs_.erase(found);
}
-EmbeddedWorkerInstance::EmbeddedWorkerInstance(
- EmbeddedWorkerRegistry* registry,
- int embedded_worker_id)
+EmbeddedWorkerInstance::EmbeddedWorkerInstance(EmbeddedWorkerRegistry* registry,
+ int embedded_worker_id)
: registry_(registry),
embedded_worker_id_(embedded_worker_id),
status_(STOPPED),
process_id_(-1),
- thread_id_(-1) {
+ thread_id_(-1),
+ worker_devtools_agent_route_id_(MSG_ROUTING_NONE) {
}
void EmbeddedWorkerInstance::OnStarted(int thread_id) {
@@ -94,6 +96,7 @@ void EmbeddedWorkerInstance::OnStopped() {
status_ = STOPPED;
process_id_ = -1;
thread_id_ = -1;
+ worker_devtools_agent_route_id_ = MSG_ROUTING_NONE;
FOR_EACH_OBSERVER(Listener, listener_list_, OnStopped());
}

Powered by Google App Engine
This is Rietveld 408576698