v8/test/debugger/regress
Toon Verwaest 00845abb32 [debug] Include Token::CLASS in class scopes and ContainsPosition
While evaluating a class literal the containing function points to
Token::CLASS. It may have pushed a context for that class that uses
the range of the class scope. So far the class scope had a range that
started after the class name or class token in case of anonymous
classes. That means the source position of the function frame doesn't
point to a position that is included in the active context range. This
breaks the debugger because it relies on being able to find the
matching parser scope for the active context by looking at the source
position.

The fix is two-fold:
- extend the class scope source range to include Token::CLASS
- update ScopeChainRetriever::ContainsPosition to include the start
  position of class scopes as a valid source position. We can't always
  include start due to arrow functions that don't have braces.

Bug: chromium:1156498
Change-Id: I9ec640c6326289dadcb154bb0a329ca6f8188f8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2857957
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74268}
2021-04-29 08:43:23 +00:00
..
regress-1639-2.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
regress-2318.js [inspector] gracefully handle stack overflows in the inspector. 2016-12-19 14:07:55 +00:00
regress-5575-1.js [debugger,compiler] do not recompile already compiled inner functions. 2016-11-11 15:53:33 +00:00
regress-5575-2.js [debugger,compiler] do not recompile already compiled inner functions. 2016-11-11 15:53:33 +00:00
regress-5575-3.js [debugger,compiler] do not recompile already compiled inner functions. 2016-11-11 15:53:33 +00:00
regress-5610.js [async] Improve async function handling. 2018-10-10 06:37:53 +00:00
regress-5901-1.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-5901-2.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-5950.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-6085.js [debugger] fix switch block source positions. 2017-03-13 12:47:48 +00:00
regress-6526.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-7421.js [cleanup] Add %PrepareFunctionForOptimize for tests that use %OptimizeOsr 2019-06-18 16:47:29 +00:00
regress-9482.js Add test for debug evaluating a previously non-whitelisted variable 2019-09-11 09:45:33 +00:00
regress-crbug-10132.js [debug] Collect source positions Debug::PrintBreakLocation 2020-01-21 12:07:03 +00:00
regress-crbug-507070.js [debug] remove legacy implementation for break points. 2018-02-26 10:01:39 +00:00
regress-crbug-724858.js [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
regress-crbug-736758.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-crbug-760225.js [debugger] Fix debug-evaluate for context-allocated this. 2019-07-05 12:14:35 +00:00
regress-crbug-808973.js [d8] Exit with error code upon unhandled promise rejection 2020-06-24 07:21:58 +00:00
regress-crbug-835973.js [interpreter] correctly advance over debug scaling prefixes. 2018-05-03 07:02:57 +00:00
regress-crbug-840288.js Report real module in addition to fake scripts 2019-11-15 09:59:58 +00:00
regress-crbug-882664.js [debug] fix scaling prefix patching for debug evaluate 2018-09-14 14:33:07 +00:00
regress-crbug-1032042.js Revert "[wasm] Send a single scriptParsed event per script" 2021-02-11 16:35:35 +00:00
regress-crbug-1156498.js [debug] Include Token::CLASS in class scopes and ContainsPosition 2021-04-29 08:43:23 +00:00
regress-crbug-1199681.js [sparkplug][debugger] Fix deopt of inlined function in debugger 2021-04-23 15:15:52 +00:00