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

Side by Side Diff: sdk/lib/indexed_db/dartium/indexed_db_dartium.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 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 942
943 this.onComplete.first.then((_) { 943 this.onComplete.first.then((_) {
944 completer.complete(db); 944 completer.complete(db);
945 }); 945 });
946 946
947 this.onError.first.then((e) { 947 this.onError.first.then((e) {
948 completer.completeError(e); 948 completer.completeError(e);
949 }); 949 });
950 950
951 this.onAbort.first.then((e) { 951 this.onAbort.first.then((e) {
952 completer.completeError(e); 952 // Avoid completing twice if an error occurs.
953 if (!completer.isCompleted) {
954 completer.completeError(e);
955 }
953 }); 956 });
954 957
955 return completer.future; 958 return completer.future;
956 } 959 }
957 960
958 // To suppress missing implicit constructor warnings. 961 // To suppress missing implicit constructor warnings.
959 factory Transaction._() { throw new UnsupportedError("Not supported"); } 962 factory Transaction._() { throw new UnsupportedError("Not supported"); }
960 963
961 @DomName('IDBTransaction.abortEvent') 964 @DomName('IDBTransaction.abortEvent')
962 @DocsEditable() 965 @DocsEditable()
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 1054
1052 1055
1053 @DocsEditable() 1056 @DocsEditable()
1054 @DomName('IDBAny') 1057 @DomName('IDBAny')
1055 @deprecated // nonstandard 1058 @deprecated // nonstandard
1056 abstract class _IDBAny extends NativeFieldWrapperClass1 { 1059 abstract class _IDBAny extends NativeFieldWrapperClass1 {
1057 // To suppress missing implicit constructor warnings. 1060 // To suppress missing implicit constructor warnings.
1058 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } 1061 factory _IDBAny._() { throw new UnsupportedError("Not supported"); }
1059 1062
1060 } 1063 }
OLDNEW
« no previous file with comments | « sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698