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

Unified Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 16022012: Fixing IndexedDB's deleteDatabase to have the correct future result. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « no previous file | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index b8427c523e790557e91c2697cbce0bd66a7f4b61..6119bdd174d97f3105c79895fb7db9e7183b0017 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -404,7 +404,14 @@ class IdbFactory native "IDBFactory" {
if (onBlocked != null) {
request.onBlocked.listen(onBlocked);
}
- return _completeRequest(request);
+ var completer = new Completer.sync();
+ request.onSuccess.listen((e) {
+ completer.complete(this);
+ });
+ request.onError.listen((e) {
+ completer.completeError(e);
+ });
+ return completer.future;
} catch (e, stacktrace) {
return new Future.error(e, stacktrace);
}
« no previous file with comments | « no previous file | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698