Skip to content

Commit d2bfd41

Browse files
committed
Add extra step for DDC library bundle format
dart-lang/sdk@6127d6c 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.
1 parent 5bf833d commit d2bfd41

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

dwds/test/common/chrome_proxy_service_common.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import 'package:path/path.dart' as path;
2020
import 'package:test/test.dart';
2121
import 'package:test_common/logging.dart';
2222
import 'package:test_common/test_sdk_configuration.dart';
23+
import 'package:test_common/utilities.dart';
2324
import 'package:vm_service/vm_service.dart';
2425
import 'package:vm_service_interface/vm_service_interface.dart';
2526

@@ -1580,6 +1581,20 @@ void runTests({
15801581
});
15811582

15821583
test('Into goes to the next Dart location', () async {
1584+
if (dartSdkIsAtLeast('3.9.0-88.0.dev') &&
1585+
moduleFormat == ModuleFormat.ddc &&
1586+
canaryFeatures) {
1587+
// With the DDC library bundle format, there's a comparison against
1588+
// the hot reload generation to avoid emitting extra checks before
1589+
// `printCount` is called. We need to step past that code before we
1590+
// get to `printCount`. See
1591+
// https://github.com/dart-lang/sdk/commit/6127d6cb8f3de7451f78b21ec9a7cb7350e77252
1592+
// for more details.
1593+
await service.resume(isolateId!, step: 'Into');
1594+
await stream.firstWhere(
1595+
(event) => event.kind == EventKind.kPauseInterrupted,
1596+
);
1597+
}
15831598
await service.resume(isolateId!, step: 'Into');
15841599
// Wait for the step to actually occur.
15851600
await stream.firstWhere(

0 commit comments

Comments
 (0)