c2f30c2b3f
For inline scripts that have a `// #sourceURL=foo.js` annotation, the V8 inspector (and by extension `Error.stack`) currently operates in terms of the `foo.js`, i.e. doesn't give any hint about the actual source, except for the line/column offsets reported upon scriptParsed. However in case of stack frames (i.e. as part of `Error.stack` or as part of the call frames reported via CDP), the line/column offsets are relative to the actual source instead of relative to the `foo.js` part, which - besides other things - makes post-processing of recorded stack traces tricky (sometimes impossible). This change adjusts the source positions reported for (inline) scripts with sourceURL annotations to be relative to the (inline) script instead of the surrounding document. Bug: chromium:1183990 Fixed: chromium:578269 Change-Id: I74f2b93c22ec43ca796b6b51faa9df5b99cf03f9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3069289 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#76097}
12 lines
231 B
Plaintext
12 lines
231 B
Plaintext
Checks that async stack contains setTimeout
|
|
inner1 (test.js:11:4)
|
|
foo1 (test.js:14:2)
|
|
-- setTimeout --
|
|
inner2 (test.js:11:4)
|
|
foo2 (test.js:13:2)
|
|
-- setTimeout --
|
|
inner3 (test.js:18:4)
|
|
foo3 (test.js:20:2)
|
|
(anonymous) (expr.js:0:0)
|
|
|