From 442f3425884fbfac51bd615a47e01e3e81e585c9 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Wed, 3 Jul 2013 23:41:22 +0200 Subject: [PATCH] Bug 889442 - Remove special about: pages code from DOM Storage. r=mayhemer --- dom/src/storage/DOMStorageManager.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/dom/src/storage/DOMStorageManager.cpp b/dom/src/storage/DOMStorageManager.cpp index b4e28bc48ac9..5b6006e0cd62 100644 --- a/dom/src/storage/DOMStorageManager.cpp +++ b/dom/src/storage/DOMStorageManager.cpp @@ -146,18 +146,9 @@ CreateScopeKey(nsIPrincipal* aPrincipal, NS_ENSURE_SUCCESS(rv, rv); if (domainScope.IsEmpty()) { - // About pages have an empty host but a valid path. Since they are handled - // internally by our own redirector, we can trust them and use path as key. - // if file:/// protocol, let's make the exact directory the domain + // For the file:/// protocol use the exact directory as domain. bool isScheme = false; - if ((NS_SUCCEEDED(uri->SchemeIs("about", &isScheme)) && isScheme) || - (NS_SUCCEEDED(uri->SchemeIs("moz-safe-about", &isScheme)) && isScheme)) { - rv = uri->GetPath(domainScope); - NS_ENSURE_SUCCESS(rv, rv); - // While the host is always canonicalized to lowercase, the path is not, - // thus need to force the casing. - ToLowerCase(domainScope); - } else if (NS_SUCCEEDED(uri->SchemeIs("file", &isScheme)) && isScheme) { + if (NS_SUCCEEDED(uri->SchemeIs("file", &isScheme)) && isScheme) { nsCOMPtr url = do_QueryInterface(uri, &rv); NS_ENSURE_SUCCESS(rv, rv); rv = url->GetDirectory(domainScope);