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
|
||
TRY looks fine https://treeherder.mozilla.org/#/jobs?repo=try&revision=3c9d00968c69516d182ce353c0181686d05fd716
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 |
https://hg.mozilla.org/mozilla-central/rev/c25f7e0a44fc
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
•