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

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

Issue 1361423004: Don't use a special var descriptor for :async_op since it can now be either stack or context alloca… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: also assert async op is either closure or null Created 5 years, 3 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
« no previous file with comments | « no previous file | runtime/observatory/tests/service/test_helper.dart » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/step_into_async_no_await_test.dart
diff --git a/runtime/observatory/tests/service/async_next_test.dart b/runtime/observatory/tests/service/step_into_async_no_await_test.dart
similarity index 52%
copy from runtime/observatory/tests/service/async_next_test.dart
copy to runtime/observatory/tests/service/step_into_async_no_await_test.dart
index 9e298f705485752323bb15a70ff64c923ac75a47..f2a8a23837ed9e4541ba755a5630180f4ceab914 100644
--- a/runtime/observatory/tests/service/async_next_test.dart
+++ b/runtime/observatory/tests/service/step_into_async_no_await_test.dart
@@ -7,36 +7,26 @@ import 'package:observatory/service_io.dart';
import 'test_helper.dart';
import 'dart:developer';
-foo() async { }
-
-doAsync(stop) async {
- if (stop) debugger();
- await foo(); // Line 14.
- await foo(); // Line 15.
- await foo(); // Line 16.
- return null;
+// :async_op will not be captured in this function because it never needs to
+// reschedule it.
+asyncWithoutAwait() async {
+ print("asyncWithoutAwait");
}
testMain() {
- // With two runs of doAsync floating around, async step should only cause
- // us to stop in the run we started in.
- doAsync(false);
- doAsync(true);
-}
-
-asyncNext(Isolate isolate) async {
- return isolate.asyncStepOver()[Isolate.kSecondResume];
+ debugger();
+ asyncWithoutAwait();
}
var tests = [
hasStoppedAtBreakpoint,
- stoppedAtLine(14),
- asyncNext,
- hasStoppedAtBreakpoint,
- stoppedAtLine(15),
- asyncNext,
+ stoppedAtLine(18),
+ (isolate) => isolate.stepInto(),
hasStoppedAtBreakpoint,
- stoppedAtLine(16),
+ (isolate) => isolate.getStack(), // Should not crash.
+ // TODO(rmacnak): stoppedAtLine(12)
+ // This doesn't happen because asyncWithoutAwait is marked undebuggable.
+ // Probably needs to change to support async-step-into.
resumeIsolate,
];
« no previous file with comments | « no previous file | runtime/observatory/tests/service/test_helper.dart » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698