Closed
Bug 1505393
Opened 6 years ago
Closed 6 years ago
JsPropertyProvider should do a better job when input contains getter
Categories
(DevTools :: Console, enhancement, P1)
Tracking
(firefox65 fixed)
RESOLVED
FIXED
Firefox 65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
(Whiteboard: [boogaloo-mvp])
Attachments
(1 file)
When provided an input containing "unsafe" getters (i.e. which execution might have side-effects), jsPropertyProvider doesn't return anything.
We could make it a bit smarter and:
- return that it encountered an unsafe getter, and its name, so we can use this information at frontend level.
- have a mode that will allow to invoke unsafe getters to retrieve properties of the value returned by such getter.
---
This is preliminary work for Bug 1499289
Assignee | ||
Updated•6 years ago
|
Whiteboard: [boogaloo-mvp]
Assignee | ||
Comment 1•6 years ago
|
||
This patch adds two things to JsPropertyProvider:
- when provided an input which try to access an unsafe
getter properties, the function will indicate that an
unsafe getter should be invoked, with its name.
- a new boolean argument that when set to true would
invoke any unsafe getter that might be in the expression
to be completed.
For simplicity sake, the function only warns the user
of the presence of an unsafe getter when it's the last
property of the expression:
`object.myGetter.` will return that `myGetter` should be invoked
`object.myGetter.a.b.` will not (because then, a and b could
also be getters, and it's getting complex to handle both in
the function itself as in the UI).
Tests are added to ensure this works as expected.
Assignee | ||
Comment 2•6 years ago
|
||
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c25f7e0a44fc
Add better handling of unsafe getters in JsPropertyProvider; r=bgrins.
Comment 4•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in
before you can comment on or make changes to this bug.
Description
•