5577c69d27
The spec says we have to insert some wrapper code with extra line breaks in it, but this confuses users when they see stack traces as the line numbers come from the code with the wrapper, instead of the original. This CL sets line_offset on the script to indicate that line numbers should be offset by the 2 extra line breaks when reading them out e.g. for the purpose of stack traces. Bug: chromium:109362 Change-Id: Ib608e1043c38b595b1466766f7592e993ee3b996 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741660 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#63127}
28 lines
940 B
Plaintext
28 lines
940 B
Plaintext
Tests that Runtime.evaluate has the correct error line number for 'new Function(...)'
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
exceptionDetails : {
|
|
columnNumber : 3
|
|
exception : {
|
|
className : TypeError
|
|
description : TypeError: 0 is not a function at eval (eval at <anonymous> (:1:1), <anonymous>:1:4) at <anonymous>:1:22
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
text : Uncaught
|
|
}
|
|
result : {
|
|
className : TypeError
|
|
description : TypeError: 0 is not a function at eval (eval at <anonymous> (:1:1), <anonymous>:1:4) at <anonymous>:1:22
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
}
|
|
}
|