Bug 510849 - Support the empty string as a key for web storage (localStorage/sessionStorage); r=mayhemer

This commit is contained in:
Ms2ger 2012-05-18 10:29:40 +02:00
parent 20cf723d9c
commit e0f9cfb196
2 changed files with 0 additions and 21 deletions

View File

@ -19,12 +19,6 @@
"StorageEvent constructor and nulls": true
},
"webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_getitem_js.html": {
"All 3 items should be added.": true,
"array access should be correct": true,
"getItem should be correct": true
},
"webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_in_js.html": {
"Web Storage 1": true
},
@ -40,12 +34,6 @@
"Web Storage 3": true
},
"webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_getitem_js.html": {
"All 3 items should be added.": true,
"array access should be correct": true,
"getItem should be correct": true
},
"webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_in_js.html": {
"Web Storage 1": true
},

View File

@ -1180,9 +1180,6 @@ nsresult
DOMStorageImpl::SetValue(bool aIsCallerSecure, const nsAString& aKey,
const nsAString& aData, nsAString& aOldValue)
{
if (aKey.IsEmpty())
return NS_OK;
nsresult rv;
nsString oldValue;
SetDOMStringToNull(oldValue);
@ -1519,9 +1516,6 @@ nsDOMStorage::GetNamedItem(const nsAString& aKey, nsresult* aResult)
}
*aResult = NS_OK;
if (aKey.IsEmpty())
return nsnull;
return mStorageImpl->GetValue(IsCallerSecure(), aKey, aResult);
}
@ -1617,9 +1611,6 @@ NS_IMETHODIMP nsDOMStorage::RemoveItem(const nsAString& aKey)
if (!CacheStoragePermissions())
return NS_ERROR_DOM_SECURITY_ERR;
if (aKey.IsEmpty())
return NS_OK;
nsString oldValue;
nsresult rv = mStorageImpl->RemoveValue(IsCallerSecure(), aKey, oldValue);
if (rv == NS_ERROR_DOM_NOT_FOUND_ERR)