Closed
Bug 830822
Opened 11 years ago
Closed 5 years ago
Implement backend support for forcing evaluation on untrusted getter properties
Categories
(DevTools :: Debugger, defect, P2)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: vporof, Unassigned)
References
Details
No description provided.
Reporter | ||
Comment 1•11 years ago
|
||
See bug 820878.
Reporter | ||
Comment 2•11 years ago
|
||
We should also make sure that setting a new value for the getter, and also for the value itself (after forcing evaluation) works property when clientEvaluating.
Updated•11 years ago
|
Assignee: nobody → past
Status: NEW → ASSIGNED
Priority: -- → P2
Comment 3•11 years ago
|
||
bumping this to P1. Blocking Mihai's work on integrating the VariablesView in the WebConsole. bug 808370.
No longer blocks: 820878
Priority: P2 → P1
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to Victor Porof [:vp] from comment #2) > We should also make sure that setting a new value for the getter, and also > for the value itself (after forcing evaluation) works property when > clientEvaluating. Setting a new getter value (as in: function) works properly since bug 831794. Changing the value force-returned by the getter (essentially turning the whole property itself into a plain value property) needs a bit of special-casing (since the "value" node is not a real property itself, just like "get" and "set"), but the heavy lifting was also done in bug 831794. Bug 820878 will take care of the UI.
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Victor Porof [:vp] from comment #4) > Changing the value force-returned by the getter (essentially turning the > whole property itself into a plain value property) Or not. That's probably not the behavior one would look for. See https://bugzilla.mozilla.org/show_bug.cgi?id=820878#c7. Anyway, special casing the "value" node is still required, because we wouldn't want to eval("myVal.getterSetterProperty.value = 42"). Other than that, I'm pretty optimistic that there won't be any complications with setters.
Comment 6•10 years ago
|
||
Lowering priority to reflect reality, as this didn't actually block the integration of the VariablesView to the web console.
Priority: P1 → P2
Comment 7•10 years ago
|
||
Not going to work on this soon.
Assignee: past → nobody
Status: ASSIGNED → NEW
Updated•10 years ago
|
Flags: firefox-backlog-
Comment 8•10 years ago
|
||
I don't understand the purpose of this bug. Could you clarify a bit Victor?
Flags: needinfo?(vporof)
Reporter | ||
Comment 9•10 years ago
|
||
Untrusted (non-system) getters appear as functions. Sometimes in our debugging endeavors we're interested in the value returned by said getter, not the getter function. Providing a mechanism to evaluate those getters on demand is necessary.
Flags: needinfo?(vporof)
Comment 10•9 years ago
|
||
I don't understand this bug either. I've just tried to write a demo to explore what the current implementation does in the context of bug 967853, and it seems to me the problem is the opposite: the debugger evaluates getters all the time, and it would probably be a good idea to give the developer using the debugger more control. See http://hallvord.com/temp/moz/dbg-getter.htm for a demo. (It's a hard problem - Chrome devtools and Opera Dragonfly fail that test too.)
Flags: needinfo?(vporof)
Reporter | ||
Comment 11•9 years ago
|
||
Getters are evaluated for tooltips when hovering. They're not evaluated in the sidebar variable view when inspecting scopes.
Flags: needinfo?(vporof)
Comment 12•9 years ago
|
||
Ah - thanks. I see. IMO this should be unified so page-defined getter properties appear the same way in all contexts. Preferably in a way you can both inspect the code of the getter and choose to run it and see the result. I think Chrome devtools was experimenting with something like [...] in the UI.
Comment 13•8 years ago
|
||
The code is here: https://dxr.mozilla.org/mozilla-central/source/devtools/server/actors/object.js#457 I think it would be safe to return a value field in that function that evaluates the getter.
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 14•5 years ago
|
||
I believe this is done.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•