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

Unified Diff: sdk/lib/indexed_db/dartium/indexed_db_dartium.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
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 15076fb6a4ef2adc23b6d7fc0ba6e72a5a11aa89..1a539d9b661ec11902a5f6d76f92ee17934c69a9 100644
--- a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
+++ b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
@@ -279,7 +279,14 @@ class IdbFactory extends NativeFieldWrapperClass1 {
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 | « sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | tools/dom/templates/html/impl/impl_IDBFactory.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698