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

Unified Diff: content/public/browser/render_process_host.h

Issue 2342523002: Forcibly clear worker ref counts on shutdown. (Closed)
Patch Set: 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
Index: content/public/browser/render_process_host.h
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h
index 47a31a45b0ed358642ef2b3eab079db44ef228ea..ec092bb46c858f512f96c897d9df8ff9325319e4 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -308,6 +308,16 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
virtual void IncrementSharedWorkerRefCount() = 0;
virtual void DecrementSharedWorkerRefCount() = 0;
+ // Sets worker ref counts to zero. Called when the browser context will be
+ // destroyed so this RenderProcessHost can immediately die.
+ //
+ // After this is called, the Increment/DecrementWorkerRefCount functions must
+ // not be called.
+ virtual void ForceReleaseWorkerRefCounts() = 0;
jam 2016/09/14 17:10:49 can you put these two methods on just RenderProces
falken 2016/09/21 08:59:43 I can't because the AllHostsIterator can include M
jam 2016/09/23 19:14:28 Is that code run during unittests though? i.e. we
+
+ // Returns true if ForceReleaseWorkerRefCounts was called.
+ virtual bool IsWorkerRefCountDisabled() = 0;
+
// Purges and suspends the renderer process.
virtual void PurgeAndSuspend() = 0;

Powered by Google App Engine
This is Rietveld 408576698