summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages_internal.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 21:53:08 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 21:53:08 +0000
commit0aa5531f4cfa1a5e4fcb571201f6c39221b1260a (patch)
tree889fd0590f06fdc99d2bee143e060a2d26c8326e /chrome/common/render_messages_internal.h
parent8ef59c3b8d485227dae56a1ce4edc784be329f59 (diff)
downloadchromium_src-0aa5531f4cfa1a5e4fcb571201f6c39221b1260a.zip
chromium_src-0aa5531f4cfa1a5e4fcb571201f6c39221b1260a.tar.gz
chromium_src-0aa5531f4cfa1a5e4fcb571201f6c39221b1260a.tar.bz2
Remove throttling code from the Browser process and implement throttling in the Renderer.
The previous way of doing throttling was just calling CloseContents() on a window to reject it. But since the Browser is notified about a window opening asynchronously, by the time the CloseContents() sends a message back to the Renderer, a bunch more windows have been opened, leading to memory exhaustion. Instead, make all RenderViews created from a parent RenderView share a counter and start refusing to create RenderViews if too many RV have been created. Every RenderView (except for the first one) is assumed to be an unrequested popup, until notified by the Browser process by either a ViewMsg_DisassociateFromPopupCount message (this RenderView is a new top level page) or a ViewMsg_DisassociatePopup message (this RenderView is a requested popup and therefore shouldn't count against the count.) BUG=3382, 2632 Review URL: http://codereview.chromium.org/7388 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3568 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages_internal.h')
-rw-r--r--chrome/common/render_messages_internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index beaa3bf..a998b49 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -454,6 +454,12 @@ IPC_BEGIN_MESSAGES(View, 1)
std::string /* The target for the message */,
std::string /* The message */)
+ // Sent to the renderer when a popup window should no longer count against
+ // the current popup count (either because it's not a popup or because it was
+ // a generated by a user action or because a constrained popup got turned
+ // into a full window).
+ IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
+
IPC_END_MESSAGES(View)