summaryrefslogtreecommitdiffstats
path: root/chrome/test/data
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/test/data
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/test/data')
-rw-r--r--chrome/test/data/constrained_files/infinite_popups.html12
-rw-r--r--chrome/test/data/constrained_files/infinite_popups_impl.html13
2 files changed, 25 insertions, 0 deletions
diff --git a/chrome/test/data/constrained_files/infinite_popups.html b/chrome/test/data/constrained_files/infinite_popups.html
new file mode 100644
index 0000000..126dd86
--- /dev/null
+++ b/chrome/test/data/constrained_files/infinite_popups.html
@@ -0,0 +1,12 @@
+<html>
+ <head>
+<title>Popup Fork Bomb!</title>
+</head>
+<body onClick="javascript:window.open('infinite_popups_impl.html', '',
+'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=50,height=50');void(0);" />
+<h1>Popup Fork Bomb!</h1>
+
+<em>Original credit to <a href="http://crypto.stanford.edu/~abarth/">http://crypto.stanford.edu/~abarth/</a>.</em>
+
+</body>
+</html>
diff --git a/chrome/test/data/constrained_files/infinite_popups_impl.html b/chrome/test/data/constrained_files/infinite_popups_impl.html
new file mode 100644
index 0000000..4b336d7
--- /dev/null
+++ b/chrome/test/data/constrained_files/infinite_popups_impl.html
@@ -0,0 +1,13 @@
+<html>
+ <head>
+<title>Oh noes!</title>
+</head>
+<body>
+<h1>Oh noes!</h1>
+
+<body onload="window.open('infinite_popups_impl.html', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=50,height=50')">
+Over and...
+</body>
+
+</body>
+</html>