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

Unified Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 2312633002: For debugging, split worker ref count into service worker and shared worker counts (Closed)
Patch Set: size_t Created 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.h
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index aad3a30c3e4ffb0e12aa8b4ba1a768727f7e3326..60994e910cacea09268c7dce2b51c1766db0d770 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -173,8 +173,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
int cdm_id) const override;
#endif
bool IsProcessBackgrounded() const override;
- void IncrementWorkerRefCount() override;
- void DecrementWorkerRefCount() override;
+ void IncrementServiceWorkerRefCount() override;
+ void DecrementServiceWorkerRefCount() override;
+ void IncrementSharedWorkerRefCount() override;
+ void DecrementSharedWorkerRefCount() override;
void PurgeAndSuspend() override;
// IPC::Sender via RenderProcessHost.
@@ -312,6 +314,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
class ConnectionFilterController;
class ConnectionFilterImpl;
+ size_t worker_ref_count() {
+ return service_worker_ref_count_ + shared_worker_ref_count_;
+ }
+
std::unique_ptr<IPC::ChannelProxy> CreateChannelProxy(
const std::string& channel_id);
@@ -417,6 +423,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
std::unique_ptr<InterfaceRegistryAndroid> interface_registry_android_;
#endif
+ size_t service_worker_ref_count_;
+ size_t shared_worker_ref_count_;
+
// The registered IPC listener objects. When this list is empty, we should
// delete ourselves.
IDMap<IPC::Listener> listeners_;
@@ -538,14 +547,12 @@ class CONTENT_EXPORT RenderProcessHostImpl
// defined below it so it is destructed first.
scoped_refptr<PeerConnectionTrackerHost> peer_connection_tracker_host_;
- int worker_ref_count_;
-
// Records the time when the process starts surviving for workers for UMA.
base::TimeTicks survive_for_worker_start_time_;
// Records the maximum # of workers simultaneously hosted in this process
// for UMA.
- int max_worker_count_;
+ size_t max_worker_count_;
// Context shared for each mojom::PermissionService instance created for this
// RPH.
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698