Closed
Bug 862689
Opened 13 years ago
Closed 3 years ago
No onerror event on deleting a nonexistent database
Categories
(Core :: Storage: IndexedDB, defect, P5)
Tracking
()
RESOLVED
INVALID
People
(Reporter: lcf.vs, Unassigned)
Details
Attachments
(1 file)
|
200 bytes,
application/octet-stream
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130409194949
Steps to reproduce:
I try to detect if a database was really deleted
Actual results:
No onerror event on deleting a nonexistent database
Expected results:
If the database doesn't exists, the onerror event to be launched
Hum, the documentation indicates that this isn't a bug ... However, there is no way to verify this without reopening (and recreate the database)
A onsuccess for trying to delete a database that doesn't exist doesn't seem to be a natural behavior.
This is by design. We try to never fire error events for normal operations that are not actual errors. Deleting records from an objectStore always fires a success event regardless of whether the record existed, as well.
Perhaps you're really just interested in a "does my database exist" function?
Or property similar to indexNames, for the databases.
It seems to me more akin to what is already existing.
Updated•8 years ago
|
Priority: -- → P5
Comment 6•3 years ago
|
||
As comment #1 said, this is compliant to the spec and Chrome behavior:
Let db be the database named name in storageKey, if one exists. Otherwise, return 0 (zero).
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•