mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
WEB-17316 JS debugger: invoke getter on object, not it's prototype
This commit is contained in:
@@ -95,7 +95,12 @@ class VariableView(override val variableName: String, private val variable: Vari
|
||||
}, false)
|
||||
node.setFullValueEvaluator(object : XFullValueEvaluator(" (invoke getter)") {
|
||||
override fun startEvaluation(callback: XFullValueEvaluator.XFullValueEvaluationCallback) {
|
||||
val valueModifier = variable.valueModifier
|
||||
var valueModifier = variable.valueModifier
|
||||
var nonProtoContext = context
|
||||
while (nonProtoContext is VariableView && nonProtoContext.variableName == PROTOTYPE_PROP) {
|
||||
valueModifier = nonProtoContext.variable.valueModifier
|
||||
nonProtoContext = nonProtoContext.parent
|
||||
}
|
||||
valueModifier!!.evaluateGet(variable, evaluateContext)
|
||||
.done(node) {
|
||||
callback.evaluated("")
|
||||
@@ -478,3 +483,5 @@ private class ArrayPresentation(length: Int, className: String?) : XValuePresent
|
||||
renderer.renderSpecialSymbol("]")
|
||||
}
|
||||
}
|
||||
|
||||
private val PROTOTYPE_PROP = "__proto__"
|
||||
Reference in New Issue
Block a user