summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 11:14:39 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 11:14:39 +0000
commit68c50e5a858c0ec0c06abebaef0fca939f76861d (patch)
treeccefd2c06ff694b78ff42d4ef2d9e2940ebc4fa7 /webkit
parent380e8ec681277f2297e2b72b85b2bde8ddb9eabf (diff)
downloadchromium_src-68c50e5a858c0ec0c06abebaef0fca939f76861d.zip
chromium_src-68c50e5a858c0ec0c06abebaef0fca939f76861d.tar.gz
chromium_src-68c50e5a858c0ec0c06abebaef0fca939f76861d.tar.bz2
Pass quota parameter to WebStorageNamespace::createSessionStorageNamespace().
Put a per-origin quota on session storage since it is using memory in the browser process, and should not be allowed to grow arbitrarily large. Landing on behalf of hans@chromium.org from http://codereview.chromium.org/1998003/show BUG=42740 TEST=none Review URL: http://codereview.chromium.org/1995014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/layout_tests/test_expectations.txt2
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h3
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc7
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h3
4 files changed, 10 insertions, 5 deletions
diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt
index fa10140..2546c17 100644
--- a/webkit/tools/layout_tests/test_expectations.txt
+++ b/webkit/tools/layout_tests/test_expectations.txt
@@ -5,4 +5,4 @@
// Only add expectations here to temporarily suppress messages on the bots
// until the changes can be landed upstream.
-
+BUG42740 : storage/domstorage/quota.html = TEXT
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h
index 9158f16..55f308f 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.h
+++ b/webkit/tools/test_shell/test_shell_webkit_init.h
@@ -198,8 +198,9 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
virtual WebKit::WebStorageNamespace* createLocalStorageNamespace(
const WebKit::WebString& path, unsigned quota) {
+ // Enforce quota here, ignoring the value from the renderer as in Chrome.
return WebKit::WebStorageNamespace::createLocalStorageNamespace(path,
- quota);
+ WebKit::WebStorageNamespace::m_localStorageQuota);
}
void dispatchStorageEvent(const WebKit::WebString& key,
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 169412e..6e5c8ce 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -333,8 +333,11 @@ WebWidget* TestWebViewDelegate::createPopupMenu(WebPopupType popup_type) {
return shell_->CreatePopupWidget();
}
-WebStorageNamespace* TestWebViewDelegate::createSessionStorageNamespace() {
- return WebKit::WebStorageNamespace::createSessionStorageNamespace();
+WebStorageNamespace* TestWebViewDelegate::createSessionStorageNamespace(
+ unsigned quota) {
+ // Enforce quota, ignoring the parameter from WebCore as in Chrome.
+ return WebKit::WebStorageNamespace::createSessionStorageNamespace(
+ WebStorageNamespace::m_sessionStorageQuota);
}
void TestWebViewDelegate::didAddMessageToConsole(
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index cdf0060..e2b36c77 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -84,7 +84,8 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type);
virtual WebKit::WebWidget* createPopupMenu(
const WebKit::WebPopupMenuInfo& info);
- virtual WebKit::WebStorageNamespace* createSessionStorageNamespace();
+ virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(
+ unsigned quota);
virtual void didAddMessageToConsole(
const WebKit::WebConsoleMessage& message,
const WebKit::WebString& source_name, unsigned source_line);