Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(950)

Unified Diff: runtime/observatory/tests/service/test_helper.dart

Issue 1170483002: Fixed breakpoint handling at return statement with inlined finally clauses. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/tests/service/test_helper.dart
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 96828ae0f5edcfe4a192a49627b19e16c1591af8..e69a257e427602dea8d89f5587c0d2bd17641276 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -173,6 +173,21 @@ Future<Isolate> hasStoppedAtBreakpoint(Isolate isolate) {
return completer.future; // Will complete when breakpoint hit.
}
+
+Future<Isolate> resumeIsolate(Isolate isolate) {
+ Completer completer = new Completer();
+ var subscription;
+ subscription = isolate.vm.events.stream.listen((ServiceEvent event) {
+ if (event.kind == ServiceEvent.kResume) {
+ subscription.cancel();
+ completer.complete();
+ }
+ });
+ isolate.resume();
+ return completer.future;
+}
+
+
/// Runs [tests] in sequence, each of which should take an [Isolate] and
/// return a [Future]. Code for setting up state can run before and/or
/// concurrently with the tests. Uses [mainArgs] to determine whether

Powered by Google App Engine
This is Rietveld 408576698