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

Unified Diff: tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate b/tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate
index 180b2b0555e9976f73af7fc64411c9bce45e9350..39133b01708628ea7c14657af039c96d10a215e3 100644
--- a/tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate
@@ -25,7 +25,10 @@ $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
});
this.onAbort.first.then((e) {
- completer.completeError(e);
+ // Avoid completing twice if an error occurs.
+ if (!completer.isCompleted) {
+ completer.completeError(e);
+ }
});
return completer.future;
« no previous file with comments | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698