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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 12610006: Renamed StreamSink to EventSink. Renamed signalError to addError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed inheritance back! Now create StreamSink instead of EventSink where we create them. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
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:_js_helper' show Creates, Returns, JSName, Null; 6 import 'dart:_js_helper' show Creates, Returns, JSName, Null;
7 import 'dart:_foreign_helper' show JS; 7 import 'dart:_foreign_helper' show JS;
8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
9 // for details. All rights reserved. Use of this source code is governed by a 9 // for details. All rights reserved. Use of this source code is governed by a
10 // BSD-style license that can be found in the LICENSE file. 10 // BSD-style license that can be found in the LICENSE file.
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 */ 998 */
999 static Stream<Cursor> _cursorStreamFromResult(Request request, 999 static Stream<Cursor> _cursorStreamFromResult(Request request,
1000 bool autoAdvance) { 1000 bool autoAdvance) {
1001 // TODO: need to guarantee that the controller provides the values 1001 // TODO: need to guarantee that the controller provides the values
1002 // immediately as waiting until the next tick will cause the transaction to 1002 // immediately as waiting until the next tick will cause the transaction to
1003 // close. 1003 // close.
1004 var controller = new StreamController(); 1004 var controller = new StreamController();
1005 1005
1006 request.onError.listen((e) { 1006 request.onError.listen((e) {
1007 //TODO: Report stacktrace once issue 4061 is resolved. 1007 //TODO: Report stacktrace once issue 4061 is resolved.
1008 controller.signalError(e); 1008 controller.addError(e);
1009 }); 1009 });
1010 1010
1011 request.onSuccess.listen((e) { 1011 request.onSuccess.listen((e) {
1012 Cursor cursor = request.result; 1012 Cursor cursor = request.result;
1013 if (cursor == null) { 1013 if (cursor == null) {
1014 controller.close(); 1014 controller.close();
1015 } else { 1015 } else {
1016 controller.add(cursor); 1016 controller.add(cursor);
1017 if (autoAdvance == true) { 1017 if (autoAdvance == true) {
1018 cursor.next(); 1018 cursor.next();
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 } 1238 }
1239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1240 // for details. All rights reserved. Use of this source code is governed by a 1240 // for details. All rights reserved. Use of this source code is governed by a
1241 // BSD-style license that can be found in the LICENSE file. 1241 // BSD-style license that can be found in the LICENSE file.
1242 1242
1243 1243
1244 @DocsEditable 1244 @DocsEditable
1245 @DomName('IDBAny') 1245 @DomName('IDBAny')
1246 class _IDBAny native "*IDBAny" { 1246 class _IDBAny native "*IDBAny" {
1247 } 1247 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698