Closed Bug 761012 Opened 12 years ago Closed 12 years ago

IndexedDB opens different database than specified.

Categories

(Core :: Storage: IndexedDB, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Optimizer, Unassigned)

Details

Attachments

(1 file)

I use an indexedDB database to manage a log. wen I destroy the logging object, I close the database, and also delete it (see destroy function in the file provided).

But sometimes, the database does not gets deleted and when I open a new database with a different name, the previous database which was not able to get deleted gets opened, and data is read from that only. This keeps happening until I go manually to "Profile Directory > indexedDB > chrome" and manually delete the files.

Some important things to notice, the function DataStore is used to create 2 instances of it, say

let name = "asdf" + (new Date()).getTime();
let A = new DataStore(name);
let B = new DataStore(name);

and while A will only read data, B will only add data.

A.destroy() will be called earlier and then later on B.destroy(true) will be called.
So that means, the same database is opened twice, simultaneously, then one is closed, and just after the second is also closed, but the second deletes the database while closing.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: