Can't explore data for storage empty with empty key
Categories
(DevTools :: Storage Inspector, defect, P3)
Tracking
(firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: sebo)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Steps to reproduce
- Open the console
- Evaluate
localStorage.setItem("", "{a: 20}");localStorage.setItem("key", "{a: 20}");
- Open the storage inspector and select the local storage entry
- Click on the line with the empty string key
Expected results
The sidebar with the parse value is displayed
Actual results
Clicking does not do anything
You can see the expected behavior by clicking on the "key" item
Comment 1•4 years ago
|
||
Quickly looking at this, it looks like the issue is coming from the ui's updateObjectSidebar method. Using the debugger I observed that this.table.selectedRow
is undefined, which causes updateObjectSide
to return early and not display the sidebar.
Digging further it looks like the TableWidget's selectedRow setter is expecting the selected row ID to be an object, but it's an empty string here. So the selectedRow
is set to null.
I'm not familar with how TableWidget works. But perhaps finding where and how the Storage panel's table items are being set and consumed by the TableWidget might be the place to start.
Comment 2•3 years ago
|
||
I can still reproduce the issue on my machine.
Honza
Assignee | ||
Comment 3•3 years ago
|
||
This sounds like the same problem as in bug 1671625. Maybe they should be merged?
Sebastian
Reporter | ||
Comment 4•3 years ago
|
||
We may keep both open just to make sure we cover both issues (localStorage and indexedDb)
Comment 5•3 years ago
|
||
Sounds good, let's keep both open (they already block the same meta bug 1667980)
Thanks Sebastian for helping with the triage.
Honza
Assignee | ||
Comment 6•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D110773
Assignee | ||
Comment 9•3 years ago
|
||
The attached patch indeed fixes the bug for all storage types, also for the indexedDB entries. Therefore I've now made the other bug a duplicate of this one.
Sebastian
Comment 10•3 years ago
|
||
Pushed by sebastianzartner@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6b62be4ffa2f Fixed storage data inspection for empty strings. r=ladybenko https://hg.mozilla.org/integration/autoland/rev/0d62a4c90040 Added test case for storage key names. r=ladybenko
Comment 11•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6b62be4ffa2f
https://hg.mozilla.org/mozilla-central/rev/0d62a4c90040
Description
•