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

Side by Side 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, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/tests/service/test_helper.dart » ('j') | runtime/vm/object.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug
5 5
6 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'test_helper.dart'; 7 import 'test_helper.dart';
8 import 'dart:developer'; 8 import 'dart:developer';
9 9
10 foo() async { } 10 // :async_op will not be captured in this function because it never needs to
11 11 // reschedule it.
12 doAsync(stop) async { 12 asyncWithoutAwait() async {
13 if (stop) debugger(); 13 print("asyncWithoutAwait");
14 await foo(); // Line 14.
15 await foo(); // Line 15.
16 await foo(); // Line 16.
17 return null;
18 } 14 }
19 15
20 testMain() { 16 testMain() {
21 // With two runs of doAsync floating around, async step should only cause 17 debugger();
22 // us to stop in the run we started in. 18 asyncWithoutAwait();
23 doAsync(false);
24 doAsync(true);
25 }
26
27 asyncNext(Isolate isolate) async {
28 return isolate.asyncStepOver()[Isolate.kSecondResume];
29 } 19 }
30 20
31 var tests = [ 21 var tests = [
32 hasStoppedAtBreakpoint, 22 hasStoppedAtBreakpoint,
33 stoppedAtLine(14), 23 stoppedAtLine(18),
34 asyncNext, 24 (isolate) => isolate.stepInto(),
35 hasStoppedAtBreakpoint, 25 hasStoppedAtBreakpoint,
36 stoppedAtLine(15), 26 (isolate) => isolate.getStack(), // Should not crash.
37 asyncNext, 27 // TODO(rmacnak): stoppedAtLine(12)
38 hasStoppedAtBreakpoint, 28 // This doesn't happen because asyncWithoutAwait is marked undebuggable.
39 stoppedAtLine(16), 29 // Probably needs to change to support async-step-into.
40 resumeIsolate, 30 resumeIsolate,
41 ]; 31 ];
42 32
43 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 33 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW
« 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