• yangguo's avatar
    [debugger] fix debug-evaluate wrt shadowed context var. · 089edbfa
    yangguo authored
    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
    
    Review URL: https://codereview.chromium.org/1500933002
    
    Cr-Commit-Position: refs/heads/master@{#32828}
    089edbfa
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...