Closed Bug 1205123 Opened 4 years ago Closed 4 years ago

Add "Remove indexedDB database" context menu entry to storage inspector

Categories

(DevTools :: Storage Inspector, enhancement)

enhancement
Not set

Tracking

(firefox49 fixed)

VERIFIED FIXED
Firefox 49
Tracking Status
firefox49 --- fixed

People

(Reporter: sebo, Assigned: jsnajdr)

References

Details

(Keywords: dev-doc-complete)

Attachments

(4 files, 1 obsolete file)

Summary: Allow to delete indexedDB databases → [BACKEND] Add "Remove indexedDB database" context menu entry to storage inspector
Assignee: nobody → jsnajdr
Part 1: backend
- added removeDatabase method to the actor. As there are no change events in indexedDB we could listen to, we need to update the hostVsStores map and send the "deleted" event to UI directly in the method.
- added removeDB method to indexedDBHelpers. This method does the heavy lifting, in the process script.
- the "patchMetadataMapsAndProtos" function is not part of the child-parent API, doesn't need to be assigned anywhere in the maybeSetupChildProcess call.

Part 2: Bugfix in the TreeWidget
- when a last child of a tree item is deleted, it shouldn't have the expander arrow anymore. Added code that sets the "empty" attribute on the parent item, plus test.

Part 3: Frontend UI
- added new delete action to the tree context menu, show it on an indexedDB database tree item
- fixed the handleDeletedItems method, so that it can handle removing a whole database from the tree

Part 4: Mochitest
Fixed return value of removeDB - make it work both in e10s and non-e10s mode.
Attachment #8744880 - Flags: review?(mratcliffe)
Attachment #8744858 - Attachment is obsolete: true
Attachment #8744858 - Flags: review?(mratcliffe)
Attachment #8744880 - Flags: review?(mratcliffe) → review+
Attachment #8744859 - Flags: review?(mratcliffe) → review+
Attachment #8744860 - Flags: review?(mratcliffe) → review+
Attachment #8744861 - Flags: review?(mratcliffe) → review+
Try run is 100% green, requesting checkin. There are parts 1 to 4, but order shouldn't matter.
Keywords: checkin-needed
Keywords: dev-doc-needed
Sorry, meant to add the keyword to bug 1231449.

Sebastian
Keywords: dev-doc-needed
Summary: [BACKEND] Add "Remove indexedDB database" context menu entry to storage inspector → Add "Remove indexedDB database" context menu entry to storage inspector
Duplicate of this bug: 1231449
(In reply to Sebastian Zartner [:sebo] from comment #10)
> Sorry, meant to add the keyword to bug 1231449.

Both frontend and backend were implemented as part of this bug, marked bug 1231449 as duplicate. Adding the dev-doc-needed keyword here. Sorry for the confusion.
Keywords: dev-doc-needed
Blocks: 1268460
Works fine for me on http://blog.vanamco.com/indexeddb-fundamentals-plus-a-indexeddb-example-tutorial/, but fails to properly handle the case when the DB is blocked. Created bug 1268460 to handle this.

Added documentation for this at https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector#IndexedDB and a release note at https://developer.mozilla.org/en-US/Firefox/Releases/49.

Sebastian
Status: RESOLVED → VERIFIED
Duplicate of this bug: 1205120
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.