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

Side by Side Diff: tools/dom/templates/html/impl/impl_IDBObjectStore.darttemplate

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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
8 8
9 @DomName('IDBObjectStore.add') 9 @DomName('IDBObjectStore.add')
10 Future add(value, [key]) { 10 Future add(value, [key]) {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 //TODO: Report stacktrace once issue 4061 is resolved. 153 //TODO: Report stacktrace once issue 4061 is resolved.
154 controller.addError(e); 154 controller.addError(e);
155 }); 155 });
156 156
157 request.onSuccess.listen((e) { 157 request.onSuccess.listen((e) {
158 Cursor cursor = request.result; 158 Cursor cursor = request.result;
159 if (cursor == null) { 159 if (cursor == null) {
160 controller.close(); 160 controller.close();
161 } else { 161 } else {
162 controller.add(cursor); 162 controller.add(cursor);
163 if (autoAdvance == true && controller.hasSubscribers) { 163 if (autoAdvance == true && controller.hasListener) {
164 cursor.next(); 164 cursor.next();
165 } 165 }
166 } 166 }
167 }); 167 });
168 return controller.stream; 168 return controller.stream;
169 } 169 }
170 } 170 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698