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

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

Issue 14103010: Change hasSubscribers to hasListener. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 8 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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 //TODO: Report stacktrace once issue 4061 is resolved. 1007 //TODO: Report stacktrace once issue 4061 is resolved.
1008 controller.addError(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 && controller.hasSubscribers) { 1017 if (autoAdvance == true && controller.hasListener) {
1018 cursor.next(); 1018 cursor.next();
1019 } 1019 }
1020 } 1020 }
1021 }); 1021 });
1022 return controller.stream; 1022 return controller.stream;
1023 } 1023 }
1024 } 1024 }
1025 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1025 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1026 // for details. All rights reserved. Use of this source code is governed by a 1026 // for details. All rights reserved. Use of this source code is governed by a
1027 // BSD-style license that can be found in the LICENSE file. 1027 // BSD-style license that can be found in the LICENSE file.
(...skipping 210 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 abstract class _IDBAny native "*IDBAny" { 1246 abstract class _IDBAny native "*IDBAny" {
1247 } 1247 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698