52b4aae2d9
When evaluating a top-level expression while paused on a breakpoint, we don't support an await expression as top-level statement. In these cases, the error was not informative and could be improved. To do so, we now propagate the information from DebugEvaluate to ParseInfo and use the parse_info in parser-base to throw a more informative error while parsing. R=jarin@chromium.org Fixed: chromium:1132245 Change-Id: I200c5af7391258256d1d86a09cbcae326327a0d9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3247037 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Cr-Commit-Position: refs/heads/main@{#77587}
38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
Test evaluating await expression on a breakpoint
|
|
|
|
Running test: testScopesPaused
|
|
Evaluating await expression
|
|
{
|
|
exceptionDetails : {
|
|
columnNumber : 0
|
|
exception : {
|
|
className : SyntaxError
|
|
description : SyntaxError: await can not be used when evaluating code while paused in the debugger at run (<anonymous>:3:3) at <anonymous>:1:1
|
|
objectId : 1.1.7
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : 1
|
|
lineNumber : 0
|
|
scriptId : 5
|
|
text : Uncaught
|
|
}
|
|
result : {
|
|
className : SyntaxError
|
|
description : SyntaxError: await can not be used when evaluating code while paused in the debugger at run (<anonymous>:3:3) at <anonymous>:1:1
|
|
objectId : 1.1.6
|
|
subtype : error
|
|
type : object
|
|
}
|
|
}
|
|
Evaluating await expression in async function
|
|
{
|
|
result : {
|
|
className : Promise
|
|
description : Promise
|
|
objectId : 1.1.8
|
|
subtype : promise
|
|
type : object
|
|
}
|
|
}
|