mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 510849 - Support the empty string as a key for web storage (localStorage/sessionStorage); r=mayhemer
This commit is contained in:
parent
20cf723d9c
commit
e0f9cfb196
@ -19,12 +19,6 @@
|
|||||||
"StorageEvent constructor and nulls": true
|
"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": {
|
"webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_in_js.html": {
|
||||||
"Web Storage 1": true
|
"Web Storage 1": true
|
||||||
},
|
},
|
||||||
@ -40,12 +34,6 @@
|
|||||||
"Web Storage 3": true
|
"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": {
|
"webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_in_js.html": {
|
||||||
"Web Storage 1": true
|
"Web Storage 1": true
|
||||||
},
|
},
|
||||||
|
@ -1180,9 +1180,6 @@ nsresult
|
|||||||
DOMStorageImpl::SetValue(bool aIsCallerSecure, const nsAString& aKey,
|
DOMStorageImpl::SetValue(bool aIsCallerSecure, const nsAString& aKey,
|
||||||
const nsAString& aData, nsAString& aOldValue)
|
const nsAString& aData, nsAString& aOldValue)
|
||||||
{
|
{
|
||||||
if (aKey.IsEmpty())
|
|
||||||
return NS_OK;
|
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsString oldValue;
|
nsString oldValue;
|
||||||
SetDOMStringToNull(oldValue);
|
SetDOMStringToNull(oldValue);
|
||||||
@ -1519,9 +1516,6 @@ nsDOMStorage::GetNamedItem(const nsAString& aKey, nsresult* aResult)
|
|||||||
}
|
}
|
||||||
|
|
||||||
*aResult = NS_OK;
|
*aResult = NS_OK;
|
||||||
if (aKey.IsEmpty())
|
|
||||||
return nsnull;
|
|
||||||
|
|
||||||
return mStorageImpl->GetValue(IsCallerSecure(), aKey, aResult);
|
return mStorageImpl->GetValue(IsCallerSecure(), aKey, aResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1617,9 +1611,6 @@ NS_IMETHODIMP nsDOMStorage::RemoveItem(const nsAString& aKey)
|
|||||||
if (!CacheStoragePermissions())
|
if (!CacheStoragePermissions())
|
||||||
return NS_ERROR_DOM_SECURITY_ERR;
|
return NS_ERROR_DOM_SECURITY_ERR;
|
||||||
|
|
||||||
if (aKey.IsEmpty())
|
|
||||||
return NS_OK;
|
|
||||||
|
|
||||||
nsString oldValue;
|
nsString oldValue;
|
||||||
nsresult rv = mStorageImpl->RemoveValue(IsCallerSecure(), aKey, oldValue);
|
nsresult rv = mStorageImpl->RemoveValue(IsCallerSecure(), aKey, oldValue);
|
||||||
if (rv == NS_ERROR_DOM_NOT_FOUND_ERR)
|
if (rv == NS_ERROR_DOM_NOT_FOUND_ERR)
|
||||||
|
Loading…
Reference in New Issue
Block a user