Display private fields in ObjectInspector
Categories
(DevTools :: Object Inspector, task, P2)
Tracking
(firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(3 files)
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
public fields are displayed just fine for now, and private fields are not enabled (see Bug 1562054)
Assignee | ||
Updated•5 years ago
|
Comment 2•4 years ago
|
||
I just noticed this bug! Bug 1650188 may be a dupe of this (though, that bug also includes point about the result computation system)
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
It would be great to do something similar to what Chrome is doing.
Matthew, do you have an idea of how much work there is on the platform to provide a way for DevTools to retrieve the private fields and their value?
Comment 4•4 years ago
|
||
So, the functionality is at least partially already extant.
From devtools perspective, I'm not sure what things look like, but from the JSAPI side, you're looking at a call to js::GetPropertyKeys
, and you just need to add JSITER_PRIVATE
to the flags to have it include private names in the list.
Comment 5•4 years ago
|
||
Getting values should just be a matter of calling GetOwnProperty with the private name JSID.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
This patch makes use of the new getOwnPrivateProperties
method on DebuggerObject
to include private properties in object grip preview.
We're also adding a PrivatePropertiesIterator actor (and associated front) that
will allow us to retrieve all the private properties (e.g. when expanding an
object in the ObjectInspector).
A xpcshell test is added to ensure we do return the expected properties.
Assignee | ||
Comment 7•4 years ago
|
||
This patch surface the private properties in Reps and in the ObjectInspector.
Tests cases are added to cover the basic behaviors we want to have in the
same version private fields are shipped in (90).
Depends on D114373
Assignee | ||
Comment 8•4 years ago
|
||
assertPreviews
was hovering over a token and then checking the Redux store in
order to assert what should be in the popup. This can be a bit brittle and it's
probably safer to check what's rendered in the DOM, as it directly maps to what's
shown to the user.
Some unused or irrelevant test helpers are removed, and tests are updated accordingly.
Depends on D115702
Comment 10•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f1b290559447
https://hg.mozilla.org/mozilla-central/rev/31e604725431
https://hg.mozilla.org/mozilla-central/rev/92356fb78f95
Description
•