| OLD | NEW |
| 1 library dart.dom.indexed_db; | 1 library dart.dom.indexed_db; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 6 import 'dart:nativewrappers'; | 6 import 'dart:nativewrappers'; |
| 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8 // for details. All rights reserved. Use of this source code is governed by a | 8 // for details. All rights reserved. Use of this source code is governed by a |
| 9 // BSD-style license that can be found in the LICENSE file. | 9 // BSD-style license that can be found in the LICENSE file. |
| 10 | 10 |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 | 870 |
| 871 | 871 |
| 872 /** | 872 /** |
| 873 * Helper for iterating over cursors in a request. | 873 * Helper for iterating over cursors in a request. |
| 874 */ | 874 */ |
| 875 static Stream<Cursor> _cursorStreamFromResult(Request request, | 875 static Stream<Cursor> _cursorStreamFromResult(Request request, |
| 876 bool autoAdvance) { | 876 bool autoAdvance) { |
| 877 // TODO: need to guarantee that the controller provides the values | 877 // TODO: need to guarantee that the controller provides the values |
| 878 // immediately as waiting until the next tick will cause the transaction to | 878 // immediately as waiting until the next tick will cause the transaction to |
| 879 // close. | 879 // close. |
| 880 var controller = new StreamController(); | 880 var controller = new StreamController(sync: true); |
| 881 | 881 |
| 882 request.onError.listen((e) { | 882 request.onError.listen((e) { |
| 883 //TODO: Report stacktrace once issue 4061 is resolved. | 883 //TODO: Report stacktrace once issue 4061 is resolved. |
| 884 controller.addError(e); | 884 controller.addError(e); |
| 885 }); | 885 }); |
| 886 | 886 |
| 887 request.onSuccess.listen((e) { | 887 request.onSuccess.listen((e) { |
| 888 Cursor cursor = request.result; | 888 Cursor cursor = request.result; |
| 889 if (cursor == null) { | 889 if (cursor == null) { |
| 890 controller.close(); | 890 controller.close(); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 // WARNING: Do not edit - generated code. | 1126 // WARNING: Do not edit - generated code. |
| 1127 | 1127 |
| 1128 | 1128 |
| 1129 @DocsEditable | 1129 @DocsEditable |
| 1130 @DomName('IDBAny') | 1130 @DomName('IDBAny') |
| 1131 @deprecated // nonstandard | 1131 @deprecated // nonstandard |
| 1132 abstract class _IDBAny extends NativeFieldWrapperClass1 { | 1132 abstract class _IDBAny extends NativeFieldWrapperClass1 { |
| 1133 _IDBAny.internal(); | 1133 _IDBAny.internal(); |
| 1134 | 1134 |
| 1135 } | 1135 } |
| OLD | NEW |