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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
diff --git a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
index 34dcf6bb979a12ca536deda4020d0bd2c26bc7e1..10a1313c2e4f10e253e11f9ac33049b4f620ad6b 100644
--- a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
+++ b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
@@ -949,7 +949,10 @@ class Transaction extends EventTarget {
});
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/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