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

Unified Diff: content/browser/shared_worker/shared_worker_service_impl.cc

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: simplify Created 3 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/shared_worker/shared_worker_service_impl.cc
diff --git a/content/browser/shared_worker/shared_worker_service_impl.cc b/content/browser/shared_worker/shared_worker_service_impl.cc
index e70050008010c91271b25c9600ab16f30efe2672..4524fd5bcc7c171b20d83613b264d2c62c43e555 100644
--- a/content/browser/shared_worker/shared_worker_service_impl.cc
+++ b/content/browser/shared_worker/shared_worker_service_impl.cc
@@ -347,6 +347,15 @@ void SharedWorkerServiceImpl::DocumentDetached(
}
}
+void SharedWorkerServiceImpl::CountFeature(SharedWorkerMessageFilter* filter,
+ int worker_route_id,
+ uint32_t feature) {
+ if (SharedWorkerHost* host =
+ FindSharedWorkerHost(filter->render_process_id(), worker_route_id)) {
+ host->CountFeature(feature);
+ }
+}
+
void SharedWorkerServiceImpl::WorkerContextClosed(
SharedWorkerMessageFilter* filter,
int worker_route_id) {
@@ -360,6 +369,10 @@ void SharedWorkerServiceImpl::WorkerContextDestroyed(
SharedWorkerMessageFilter* filter,
int worker_route_id) {
ScopedWorkerDependencyChecker checker(this);
+ if (SharedWorkerHost* host =
+ FindSharedWorkerHost(filter->render_process_id(), worker_route_id)) {
+ host->WorkerContextDestroyed();
+ }
ProcessRouteIdPair key(filter->render_process_id(), worker_route_id);
worker_hosts_.erase(key);
}

Powered by Google App Engine
This is Rietveld 408576698