| 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 | 856 |
| 857 | 857 |
| 858 /** | 858 /** |
| 859 * Helper for iterating over cursors in a request. | 859 * Helper for iterating over cursors in a request. |
| 860 */ | 860 */ |
| 861 static Stream<Cursor> _cursorStreamFromResult(Request request, | 861 static Stream<Cursor> _cursorStreamFromResult(Request request, |
| 862 bool autoAdvance) { | 862 bool autoAdvance) { |
| 863 // TODO: need to guarantee that the controller provides the values | 863 // TODO: need to guarantee that the controller provides the values |
| 864 // immediately as waiting until the next tick will cause the transaction to | 864 // immediately as waiting until the next tick will cause the transaction to |
| 865 // close. | 865 // close. |
| 866 var controller = new StreamController<Cursor>(); | 866 var controller = new StreamController(); |
| 867 | 867 |
| 868 request.onError.listen((e) { | 868 request.onError.listen((e) { |
| 869 //TODO: Report stacktrace once issue 4061 is resolved. | 869 //TODO: Report stacktrace once issue 4061 is resolved. |
| 870 controller.signalError(e); | 870 controller.signalError(e); |
| 871 }); | 871 }); |
| 872 | 872 |
| 873 request.onSuccess.listen((e) { | 873 request.onSuccess.listen((e) { |
| 874 Cursor cursor = request.result; | 874 Cursor cursor = request.result; |
| 875 if (cursor == null) { | 875 if (cursor == null) { |
| 876 controller.close(); | 876 controller.close(); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 | 1107 |
| 1108 // WARNING: Do not edit - generated code. | 1108 // WARNING: Do not edit - generated code. |
| 1109 | 1109 |
| 1110 | 1110 |
| 1111 @DocsEditable | 1111 @DocsEditable |
| 1112 @DomName('IDBAny') | 1112 @DomName('IDBAny') |
| 1113 class _IDBAny extends NativeFieldWrapperClass1 { | 1113 class _IDBAny extends NativeFieldWrapperClass1 { |
| 1114 _IDBAny.internal(); | 1114 _IDBAny.internal(); |
| 1115 | 1115 |
| 1116 } | 1116 } |
| OLD | NEW |