No onerror event on deleting a nonexistent database

UNCONFIRMED
Unassigned

Status

()

P5
normal
UNCONFIRMED
6 years ago
8 months ago

People

(Reporter: lcf.vs, Unassigned)

Tracking

20 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

200 bytes, application/octet-stream
Details
(Reporter)

Description

6 years ago
Created attachment 738363 [details]
IndexedDB.onerror.bug.js

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
(Reporter)

Comment 1

6 years ago
Hum, the documentation indicates that this isn't a bug ... However, there is no way to verify this without reopening (and recreate the database)
(Reporter)

Comment 2

6 years ago
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?
(Reporter)

Comment 4

6 years ago
Yeah, it's really an interesting feature... :)
(Reporter)

Comment 5

6 years ago
Or property similar to indexNames, for the databases.

It seems to me more akin to what is already existing.

Updated

8 months ago
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.