From c8fae2c4f4bafb43b99b516510958698606634d4 Mon Sep 17 00:00:00 2001 From: "marja@chromium.org" Date: Wed, 18 Dec 2013 14:19:04 +0000 Subject: Revert "Revert 217570 "Undo band-aid which was ignoring wrong SessionSto..."" This reverts r240394. Restoring the band-aid because of crbug.com/325378 shouldn't have been done, as crbug.com/325378 will result in content from separate storage partitions getting mixed, instead of just killing renderers under some unclear circumstances (which the bandaid was protecting from). BUG= R=jochen@chromium.org Review URL: https://codereview.chromium.org/118253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241564 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/dom_storage/dom_storage_host.cc | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'content') diff --git a/content/browser/dom_storage/dom_storage_host.cc b/content/browser/dom_storage/dom_storage_host.cc index 9128f57..556f76d 100644 --- a/content/browser/dom_storage/dom_storage_host.cc +++ b/content/browser/dom_storage/dom_storage_host.cc @@ -32,12 +32,8 @@ bool DOMStorageHost::OpenStorageArea(int connection_id, int namespace_id, return false; // Indicates the renderer gave us very bad data. NamespaceAndArea references; references.namespace_ = context_->GetStorageNamespace(namespace_id); - if (!references.namespace_.get()) { - // TODO(michaeln): Fix crbug/134003 and return false here. - // Until then return true to avoid crashing the renderer for - // sending a bad message. - return true; - } + if (!references.namespace_.get()) + return false; references.area_ = references.namespace_->OpenStorageArea(origin); DCHECK(references.area_.get()); connections_[connection_id] = references; @@ -56,12 +52,8 @@ bool DOMStorageHost::ExtractAreaValues( int connection_id, DOMStorageValuesMap* map, bool* send_log_get_messages) { map->clear(); DOMStorageArea* area = GetOpenArea(connection_id); - if (!area) { - // TODO(michaeln): Fix crbug/134003 and return false here. - // Until then return true to avoid crashing the renderer - // for sending a bad message. - return true; - } + if (!area) + return false; if (!area->IsLoadedInMemory()) { DOMStorageNamespace* ns = GetNamespace(connection_id); DCHECK(ns); @@ -107,12 +99,8 @@ bool DOMStorageHost::SetAreaItem( const base::string16& value, const GURL& page_url, base::NullableString16* old_value) { DOMStorageArea* area = GetOpenArea(connection_id); - if (!area) { - // TODO(michaeln): Fix crbug/134003 and return false here. - // Until then return true to allow the renderer to operate - // to a limited degree out of its cache. - return true; - } + if (!area) + return false; if (!area->SetItem(key, value, old_value)) return false; if (old_value->is_null() || old_value->string() != value) -- cgit v1.1