OLD | NEW |
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 | 4 |
5 library test.backend.declarer; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 | 6 |
9 import '../frontend/timeout.dart'; | 7 import '../frontend/timeout.dart'; |
10 import '../utils.dart'; | 8 import '../utils.dart'; |
11 import 'group.dart'; | 9 import 'group.dart'; |
12 import 'group_entry.dart'; | 10 import 'group_entry.dart'; |
13 import 'invoker.dart'; | 11 import 'invoker.dart'; |
14 import 'metadata.dart'; | 12 import 'metadata.dart'; |
15 import 'test.dart'; | 13 import 'test.dart'; |
16 | 14 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 var completer = new Completer(); | 219 var completer = new Completer(); |
222 | 220 |
223 Invoker.current.addOutstandingCallback(); | 221 Invoker.current.addOutstandingCallback(); |
224 Invoker.current.waitForOutstandingCallbacks(() { | 222 Invoker.current.waitForOutstandingCallbacks(() { |
225 new Future.sync(body).whenComplete(completer.complete); | 223 new Future.sync(body).whenComplete(completer.complete); |
226 }).then((_) => Invoker.current.removeOutstandingCallback()); | 224 }).then((_) => Invoker.current.removeOutstandingCallback()); |
227 | 225 |
228 return completer.future; | 226 return completer.future; |
229 } | 227 } |
230 } | 228 } |
OLD | NEW |