v8/test/inspector/debugger/set-script-source-debug-evaluate-closure-expected.txt
Simon Zünd 45026a66ef [liveedit] Replace ScopeObject instead of updating positions in-place
Currently, LiveEdit updates the source positions of unchanged SFIs
in-place (the SFI could have moved due to other functions changing).

This interfere with our plans to re-use ScopeInfo-based blocklists
for debug-evaluate. Entries in the global block list cache are keyed
by ScopeInfo's source position. Any closure that escaped a
debug-evaluate will point to the old ScopeInfo in its context chain
and the block lists should stay in-place in case the escaped closure
is called again.

Rather than updating ScopeInfos in-place, this CL updates the
ScopeInfo object wholesale for unchanged SFIs. This is safe todo
given that the old and new ScopeInfo are identical modulo source
positions.

Drive-by: Take the source position of the function token from the
`FunctionLiteral` rather than doing a more expensive position
translation.

Bug: chromium:1363561
Change-Id: I2b8476edd8d7dc4c618e53551aa5692a21d6fb32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3932724
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83536}
2022-10-05 13:14:47 +00:00

17 lines
566 B
Plaintext

Check that setScriptSource doesn't affect debug-evaluate block listing
{
className : ReferenceError
description : ReferenceError: a is not defined at globalThis.foo (eval at i (:1:1), <anonymous>:1:27) at <anonymous>:1:12
objectId : <objectId>
subtype : error
type : object
}
Debugger.setScriptSource: Ok
{
className : ReferenceError
description : ReferenceError: a is not defined at globalThis.foo (eval at i (:1:1), <anonymous>:1:27) at <anonymous>:1:12
objectId : <objectId>
subtype : error
type : object
}