Closed
Bug 1451991
Opened 6 years ago
Closed 6 years ago
Devtools: Localstorage didn't list item whose key names "key"
Categories
(DevTools :: Storage Inspector, defect)
DevTools
Storage Inspector
Tracking
(firefox61 fixed)
RESOLVED
FIXED
Firefox 61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: im, Assigned: miker)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20100101 Steps to reproduce: Run localStorage.setItem("key", "value") localStorage.setItem("key2", "value") in devtools' console and switch to storage tab and inspect localStoage list. Same to sessionStorage Actual results: Only item "key2" is listed. Expected results: Both items "key" and "key2" are listed.
Reporter | ||
Updated•6 years ago
|
Component: Untriaged → Developer Tools: Storage Inspector
Comment hidden (obsolete) |
Assignee | ||
Comment 2•6 years ago
|
||
So the issue is that we use Object.keys to iterate through these storage types and "key" is a method on the prototype. localStorage.setItem("setItem", "value3") would cause a similar issue. So we need to find a way to get all keys.
Reporter | ||
Comment 3•6 years ago
|
||
for ( var i = 0, len = localStorage.length; i < len; ++i ) { console.log( localStorage.key( i ) ); } Dirty but works.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → mratcliffe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment hidden (mozreview-request) |
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8968136 [details] Bug 1451991 - Devtools: Localstorage didn't list item whose key names "key" https://reviewboard.mozilla.org/r/236812/#review242562 Looks good to me, thanks Mike
Attachment #8968136 -
Flags: review?(nchevobbe) → review+
Pushed by mratcliffe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/865e7a04728a Devtools: Localstorage didn't list item whose key names "key" r=nchevobbe
Comment 7•6 years ago
|
||
Backed out for mochitest devtools failures on browser_storage_basic_usercontextid_1.js Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&fromchange=865e7a04728ade4af81bc6d2899021f19f01b766&tochange=ab04b1ca218d7a0ce370ca9f2fd2028fee17567a&filter-searchStr=mochitest%20devtools&selectedJob=174054800 Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=174057723&repo=autoland&lineNumber=4382 https://treeherder.mozilla.org/logviewer.html#?job_id=174057308&repo=autoland&lineNumber=2433 Backout link: https://hg.mozilla.org/integration/autoland/rev/4a8db7192072a42e389e74f0e5e68af90ebf1d69
Flags: needinfo?(mratcliffe)
Comment hidden (mozreview-request) |
Pushed by mratcliffe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8218cd8d6ec1 Devtools: Localstorage didn't list item whose key names "key" r=nchevobbe
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8218cd8d6ec1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(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
•