Closed
Bug 1260380
Opened 9 years ago
Closed 9 years ago
"Parsed value" section gets duplicated when editing a local storage entry
Categories
(DevTools :: Storage Inspector, defect)
DevTools
Storage Inspector
Tracking
(firefox48 fixed)
RESOLVED
FIXED
Firefox 48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: pbro, Assigned: jsnajdr)
References
Details
Attachments
(1 file)
6.02 KB,
patch
|
Details | Diff | Splinter Review |
STR:
- (this depends on bug 1231155)
- open the mozilla.org site
- open the console
- enter localStorage.setItem('test', '{"foo": "bar"}')
- open the storage inspector
- switch to the local storage item in the tree-view
- click on the 'test' item
=> Notice that the sidebar opens and shows the JSON value as a parsed JS object
- now, double-click on the '{"foo": "bar"}' value in the table
- edit bar to bar2 instead
- press enter
=> Notice that the "Parsed Value" section in the sidebar is now duplicated, there are 2 parsed JS objects in there.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jsnajdr
Assignee | ||
Comment 1•9 years ago
|
||
This bug happens because:
1. After editing a value, displayObjectSidebar() is called twice in a quick succession. This is because the row get reselected [1] and updated [2] as the result of the edit.
2. In displayObjectSidebar(), the UI update is broken into two parts - first it's cleared and a part of the content is added, then it waits for an async action (getting value of a string grip), and then finishes the UI update. Race conditions happen that cause the "Parsed Value" section to be duplicated.
Fixed this by refactoring the displayObjectSidebar() method to first do any async actions, and then do the whole UI update synchronously.
Attachment #8743781 -
Flags: review?(mratcliffe)
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8743781 [details] [diff] [review]
'Parsed value' section gets duplicated when editing.
Review of attachment 8743781 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good... r+ on green try.
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Updated•8 years ago
|
Attachment #8743781 -
Flags: review?(mratcliffe)
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•