The default bug view has changed. See this FAQ.

Fire "blocked" event if deleteDatabase is blocked by running versionchange transaction

RESOLVED FIXED in Firefox 49

Status

()

Core
DOM: IndexedDB
RESOLVED FIXED
4 years ago
10 months ago

People

(Reporter: sicking, Assigned: bevistseng)

Tracking

unspecified
mozilla49
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox49 fixed)

Details

(Whiteboard: [tw-dom] btpp-active)

Attachments

(1 attachment)

Apparently we don't fire a "blocked" event if someone tries to delete a database if we're currently in the process of running a versionchange transaction.
(Assignee)

Updated

11 months ago
Assignee: nobody → btseng
(Assignee)

Updated

11 months ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

11 months ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8dcf73ad13de
(Assignee)

Comment 2

11 months ago
Created attachment 8751230 [details] [diff] [review]
(v1) Patch: Fire "blocked" event if deleteDatabase is blocked by other open connection. r=khuey

After further investigation, the "block" event is fired while deleting database if other open connection is available in current implementation.
The remained problem is that we didn't provide correct db's version but "0" as the oldVersion of the blocked event [1][2].

Changes in this patch:
1. SendBlocked with proper db version while deleting database.
2. Two test cases are added to ensure that the "blocked" event will be fired to the deleting request either during the versionchange transaction or after an open request is success with active DB connection.

[1] http://w3c.github.io/IndexedDB/#deleting-a-database
[2] https://hg.mozilla.org/mozilla-central/annotate/043082cb7bd8490c60815f67fbd1f33323ad7663/dom/indexedDB/ActorsParent.cpp#l22231
Attachment #8751230 - Flags: review?(khuey)
(Assignee)

Updated

11 months ago
Whiteboard: [tw-dom] btpp-active
Comment on attachment 8751230 [details] [diff] [review]
(v1) Patch: Fire "blocked" event if deleteDatabase is blocked by other open connection. r=khuey

Review of attachment 8751230 [details] [diff] [review]:
-----------------------------------------------------------------

Hmm, I thought it was harder than this when I looked at bug 1220279.  Please double check that that bug is an exact duplicate of this.
Attachment #8751230 - Flags: review?(khuey) → review+
(Assignee)

Updated

11 months ago
Duplicate of this bug: 1220279
(Assignee)

Comment 5

11 months ago
treeherder result in comment 1 looks fine.
Keywords: checkin-needed
(Assignee)

Updated

11 months ago
Attachment #8751230 - Attachment description: (v1) Patch: Fire "blocked" event if deleteDatabase is blocked by other open connection. → (v1) Patch: Fire "blocked" event if deleteDatabase is blocked by other open connection. r=khuey

Comment 6

11 months ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d818be07b423
Keywords: checkin-needed

Comment 7

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d818be07b423
Status: ASSIGNED → RESOLVED
Last Resolved: 10 months ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.