Files
sdk/runtime/tests
Tess Strickland 2c804fa251 [vm] Handle the context of implicit instance closures in the debugger.
Since the only captured variable in the context for an implicit
instance closure is this, the allocation of a context object is
elided and instead the instance is stored directly as the "context".

In the debugger, create the elided context object for implicit instance
closures when retrieving the saved context from an implicit instance
closure activation frame.

Without this, any attempt to GetSavedCurrentContext() on an
ActivationFrame for an implicit instance closure (e.g., when
--trace-debugger-stacktrace is enabled) breaks due to the assert
in debug mode, and returns a null context (which isn't correct either)
in non-debug modes.

TEST=vm/dart/regress_cl_463021

Change-Id: I2ba22407695f432a30d23d342f33dfe2a00ba308
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/463021
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-11-24 04:39:04 -08:00
..