зеркало из https://github.com/mozilla/gecko-dev.git
Bug 510849 - Support the empty string as a key for web storage (localStorage/sessionStorage); r=mayhemer
This commit is contained in:
Родитель
67565741f6
Коммит
880296d19f
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче