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

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: separate checks 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..a65f5952f3e1c9cd2a5fa6d8c6163ac91da11bdc 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;
+ int 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
+ int service_worker_ref_count_;
jochen (gone - plz use gerrit) 2016/09/05 09:45:15 what about making them size_t while touching this?
falken 2016/09/05 12:06:45 Done.
+ int shared_worker_ref_count_;
+
// The registered IPC listener objects. When this list is empty, we should
// delete ourselves.
IDMap<IPC::Listener> listeners_;
@@ -538,8 +547,6 @@ 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_;
« 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