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

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

Issue 26789008: Fixing double-completing indexed DB transactions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 /** 1 /**
2 * A client-side key-value store with support for indexes. 2 * A client-side key-value store with support for indexes.
3 * 3 *
4 * Many browsers support IndexedDB—a web standard for 4 * Many browsers support IndexedDB—a web standard for
5 * an indexed database. 5 * an indexed database.
6 * By storing data on the client in an IndexedDB, 6 * By storing data on the client in an IndexedDB,
7 * a web app gets some advantages, such as faster performance and persistence. 7 * a web app gets some advantages, such as faster performance and persistence.
8 * To find out which browsers support IndexedDB, 8 * To find out which browsers support IndexedDB,
9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) 9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb)
10 * 10 *
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 1254
1255 this.onComplete.first.then((_) { 1255 this.onComplete.first.then((_) {
1256 completer.complete(db); 1256 completer.complete(db);
1257 }); 1257 });
1258 1258
1259 this.onError.first.then((e) { 1259 this.onError.first.then((e) {
1260 completer.completeError(e); 1260 completer.completeError(e);
1261 }); 1261 });
1262 1262
1263 this.onAbort.first.then((e) { 1263 this.onAbort.first.then((e) {
1264 completer.completeError(e); 1264 // Avoid completing twice if an error occurs.
1265 if (!completer.isCompleted) {
1266 completer.completeError(e);
1267 }
1265 }); 1268 });
1266 1269
1267 return completer.future; 1270 return completer.future;
1268 } 1271 }
1269 1272
1270 // To suppress missing implicit constructor warnings. 1273 // To suppress missing implicit constructor warnings.
1271 factory Transaction._() { throw new UnsupportedError("Not supported"); } 1274 factory Transaction._() { throw new UnsupportedError("Not supported"); }
1272 1275
1273 @DomName('IDBTransaction.abortEvent') 1276 @DomName('IDBTransaction.abortEvent')
1274 @DocsEditable() 1277 @DocsEditable()
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 // BSD-style license that can be found in the LICENSE file. 1352 // BSD-style license that can be found in the LICENSE file.
1350 1353
1351 1354
1352 @DocsEditable() 1355 @DocsEditable()
1353 @DomName('IDBAny') 1356 @DomName('IDBAny')
1354 @deprecated // nonstandard 1357 @deprecated // nonstandard
1355 abstract class _IDBAny extends Interceptor native "IDBAny" { 1358 abstract class _IDBAny extends Interceptor native "IDBAny" {
1356 // To suppress missing implicit constructor warnings. 1359 // To suppress missing implicit constructor warnings.
1357 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } 1360 factory _IDBAny._() { throw new UnsupportedError("Not supported"); }
1358 } 1361 }
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