Open
Bug 871985
Opened 12 years ago
Updated 2 years ago
Make safe getter value descriptors more like regular data descriptors
Categories
(DevTools :: Debugger, task, P5)
DevTools
Debugger
Tracking
(Not tracked)
NEW
People
(Reporter: past, Unassigned)
References
(Blocks 1 open bug)
Details
In the remote debugging protocol a data descriptor looks like this:
"b": {
"value": "beta",
"enumerable": true,
"configurable": false,
"writable": true
}
Safe getter value descriptors however are currently like this:
"localName": {
"getterValue": "p",
"getterPrototypeLevel": 4,
"enumerable": true,
"writable": true
}
I propose that we make them look more like regular data descriptors, with a single additional property, |getterPrototypeLevel|:
"localName": {
"value": "p",
"enumerable": true,
"configurable": true,
"writable": true,
"getterPrototypeLevel": 4
}
This has the benefit that client code doesn't have to handle these new descriptors specially, and displaying an object's properties in the traditional way is just a matter of merging the contents of |ownProperties| and |safeGetterValues|. It seems like adding |configurable| is a no-brainer and converting |getterValue| to |value| is net positive, since there is no ambiguity that this value was obtained by a getter (from the |getterPrototypeLevel| property and from the location of the descriptor inside the |safeGetterValues| dictionary.
Reporter | ||
Updated•12 years ago
|
Component: Developer Tools: Console → Developer Tools: Debugger
Summary: Make safe getter value descriptors more alike regular data descriptors → Make safe getter value descriptors more like regular data descriptors
Reporter | ||
Updated•11 years ago
|
Priority: -- → P3
Comment 1•11 years ago
|
||
Perhaps presence of a setter can be used to determine writability as well.
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 2•5 years ago
|
||
I believe this might have been fixed. CC nicolas.
Comment 3•5 years ago
|
||
We still have the structure described in Comment 0 : devtools/server/actors/object.js#414-419
Flags: needinfo?(nchevobbe)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•