From d2bfd41fc90edeba64e4739b5477a1c26c99045e Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 5 May 2025 12:26:46 -0700 Subject: [PATCH] Add extra step for DDC library bundle format https://github.com/dart-lang/sdk/commit/6127d6cb8f3de7451f78b21ec9a7cb7350e77252 adds an extra check to avoid emitting extra runtime checks if the hot reload generation hasn't changed. One of the breakpoint tests relies on the JS location of the Dart code being the location right before the function call, but that needs to be updated to step past that extra check. --- dwds/test/common/chrome_proxy_service_common.dart | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dwds/test/common/chrome_proxy_service_common.dart b/dwds/test/common/chrome_proxy_service_common.dart index 178aed35a..4cbfde5d6 100644 --- a/dwds/test/common/chrome_proxy_service_common.dart +++ b/dwds/test/common/chrome_proxy_service_common.dart @@ -20,6 +20,7 @@ import 'package:path/path.dart' as path; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; import 'package:test_common/test_sdk_configuration.dart'; +import 'package:test_common/utilities.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; @@ -1580,6 +1581,20 @@ void runTests({ }); test('Into goes to the next Dart location', () async { + if (dartSdkIsAtLeast('3.9.0-88.0.dev') && + moduleFormat == ModuleFormat.ddc && + canaryFeatures) { + // With the DDC library bundle format, there's a comparison against + // the hot reload generation to avoid emitting extra checks before + // `printCount` is called. We need to step past that code before we + // get to `printCount`. See + // https://github.com/dart-lang/sdk/commit/6127d6cb8f3de7451f78b21ec9a7cb7350e77252 + // for more details. + await service.resume(isolateId!, step: 'Into'); + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseInterrupted, + ); + } await service.resume(isolateId!, step: 'Into'); // Wait for the step to actually occur. await stream.firstWhere(