Description[debugger] fix debug-evaluate wrt shadowed context var.
Debug-evaluate used to resolve stack variables that shadow
context variables incorrectly, since the stack variable is
not visible in the context chain.
To fix this, we limit local variables accessible by debug-
evaluate to the ones directly referenced inside the function.
What is not referenced by the function itself, is considered
optimized out and not accessible by debug-evaluate.
To achieve this, we duplicate the entire context chain up to
the native context, and write back changes after debug-
evaluate. Changes to the original context chain will however
be overwritten. This already happens for catch and block
scopes though.
Also fix a crash caused by declaring variables inside debug-
evaluate.
R=mstarzinger@chromium.org
BUG=v8:4593
LOG=N
Committed: https://crrev.com/089edbfa97eab324bc463829ea03c167fdc6d45c
Cr-Commit-Position: refs/heads/master@{#32828}
Patch Set 1 #
Total comments: 1
Patch Set 2 : reimplement #Patch Set 3 : third attempt at this #Patch Set 4 : test case #
Total comments: 1
Patch Set 5 : skip script context #Patch Set 6 : fix tests #Patch Set 7 : fix declaration inside debug-evaluate #Patch Set 8 : fix failures #Patch Set 9 : add TODO #
Total comments: 1
Messages
Total messages: 38 (10 generated)
|