mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 06:22:33 +00:00
Fixing bug 340144. Crash if calling sessionStorage.removeItem() with a non-existing key. r=enndeakin@sympatico.ca, sr=bzbarsky@mit.edu
This commit is contained in:
parent
82333c8b3b
commit
1eebb3195b
@ -369,16 +369,20 @@ NS_IMETHODIMP nsDOMStorage::RemoveItem(const nsAString& aKey)
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mItemsCached = PR_FALSE;
|
||||
|
||||
BroadcastChangeNotification();
|
||||
#endif
|
||||
}
|
||||
else if (entry) {
|
||||
// clear string as StorageItems may be referencing this item
|
||||
entry->mItem->ClearValue();
|
||||
|
||||
BroadcastChangeNotification();
|
||||
}
|
||||
|
||||
mItems.RawRemoveEntry(entry);
|
||||
|
||||
BroadcastChangeNotification();
|
||||
if (entry) {
|
||||
mItems.RawRemoveEntry(entry);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user