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

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: add 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 8bad50974d3c0b7305c82804c7144c3c1d38332f..b56df25d360c32cb54c4346671cde192937df6b0 100644
--- a/content/browser/service_worker/embedded_worker_instance.cc
+++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -75,21 +75,25 @@ 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::RecordProcessId(int process_id,
- ServiceWorkerStatusCode status) {
+void EmbeddedWorkerInstance::RecordProcessId(
+ int process_id,
+ ServiceWorkerStatusCode status,
+ int worker_devtools_agent_route_id) {
DCHECK_EQ(process_id_, -1);
+ DCHECK_EQ(worker_devtools_agent_route_id_, MSG_ROUTING_NONE);
if (status == SERVICE_WORKER_OK) {
process_id_ = process_id;
+ worker_devtools_agent_route_id_ = worker_devtools_agent_route_id;
} else {
status_ = STOPPED;
}
@@ -109,6 +113,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());
}
« no previous file with comments | « content/browser/service_worker/embedded_worker_instance.h ('k') | content/browser/service_worker/embedded_worker_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698