Closed Bug 1613356 Opened 4 years ago Closed 3 years ago

Can't explore data for storage empty with empty key

Categories

(DevTools :: Storage Inspector, defect, P3)

defect

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: nchevobbe, Assigned: sebo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Steps to reproduce

  1. Open the console
  2. Evaluate localStorage.setItem("", "{a: 20}");localStorage.setItem("key", "{a: 20}");
  3. Open the storage inspector and select the local storage entry
  4. 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

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.

I can still reproduce the issue on my machine.

Honza

Blocks: 1667980
Severity: normal → S3

This sounds like the same problem as in bug 1671625. Maybe they should be merged?

Sebastian

Type: task → defect
Flags: needinfo?(odvarko)
See Also: → 1671625

We may keep both open just to make sure we cover both issues (localStorage and indexedDb)

Sounds good, let's keep both open (they already block the same meta bug 1667980)

Thanks Sebastian for helping with the triage.

Honza

Flags: needinfo?(odvarko)
Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED

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

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
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: