Closed Bug 805560 Opened 12 years ago Closed 9 years ago

IndexedDB used inside iframe stops invoking callbacks once warningQuota is reached

Categories

(Core :: Storage: IndexedDB, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cscott, Unassigned)

References

()

Details

I'll try to get a better testcase for this, but currently my IndexedDB-using drawing app (http://nell-colors.github.cscott.net -- but I've changed the live version to use DOM storage for now) hangs after I create a certain number of drawings. By hangs I mean, the request=idb.open('<new database name>', version) call completes, but none of the callbacks (request.onsuccess, request.onerror, request.onblocked) are even invoked when I'm creating the 8th or so new database. All future database opens (even to already existing databases) also block in the same way (no callbacks are ever invoked). I'm speculating that what it happening is that the idb permissions dialog is being invoked but failing to ever become visible and so all the rest of the idb operations are waiting for the user to click on the invisible dialog.
There's a simple test case at: http://mozbugs.github.cscott.net/805560/ Actually, *too* simple, in that my test case appears to work correctly: the warningQuota dialog appears. I need to look further into how my actual application is different from this simple test case. Perhaps it is related to the exact operation which pushes the DB over the limit -- in the test case it's always a put -- or else related to the fact that my actual application involves an iframe. (My money's on the latter.) So: still working on a good test case.
Ok. Got it -- it was the iframe that was causing the problems. I updated the test case at http://mozbugs.github.cscott.net/805560/ and it now fails on Fennec the same way my app does. I can confirm that the test case works properly without the iframe, and fails when run inside it.
Summary: IndexedDB stops invoking callbacks once warningQuota is reached → IndexedDB used inside iframe stops invoking callbacks once warningQuota is reached
Status: UNCONFIRMED → NEW
Ever confirmed: true
Jan, is this still a problem?
Component: General → DOM: IndexedDB
Flags: needinfo?(jvarga)
Product: Firefox for Android → Core
Ok, I tested this locally. Desktop works just fine, both default and persistent storage. For persistent storage, I modified the .open() call to .open(name, { version: 1, storage: "persistent"}). For persistent storage I got the initial prompt to allow storing files in persistent storage for given origin. Fennec only works for default storage since persistent storage is not allowed on Fennec. I got the onerror event. So all in all, I think this works just fine as expected.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jvarga)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.