| 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..32ddc6cab49290b6dcefd6187c0943e7b987c8de 100644
|
| --- a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
|
| +++ b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
|
| @@ -940,16 +940,22 @@ class Transaction extends EventTarget {
|
| Future<Database> get completed {
|
| var completer = new Completer<Database>();
|
|
|
| + var errored = false;
|
| +
|
| this.onComplete.first.then((_) {
|
| completer.complete(db);
|
| });
|
|
|
| this.onError.first.then((e) {
|
| + errored = true;
|
| completer.completeError(e);
|
| });
|
|
|
| this.onAbort.first.then((e) {
|
| - completer.completeError(e);
|
| + // Avoid completing twice if an error occurs.
|
| + if (!errored) {
|
| + completer.completeError(e);
|
| + }
|
| });
|
|
|
| return completer.future;
|
|
|