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

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

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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/async/future_impl.dart ('k') | 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 a6d84a6df8fd70af3deacfa10c08c44e2a143ed1..cdd274213aea8e0569b013f6bc365472ae9d618c 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -143,7 +143,7 @@ class Cursor native "*IDBCursor" {
try {
return _completeRequest($dom_delete());
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -152,7 +152,7 @@ class Cursor native "*IDBCursor" {
try {
return _completeRequest($dom_update(value));
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -367,7 +367,7 @@ class IdbFactory native "*IDBFactory" {
{int version, void onUpgradeNeeded(VersionChangeEvent),
void onBlocked(Event)}) {
if ((version == null) != (onUpgradeNeeded == null)) {
- return new Future.immediateError(new ArgumentError(
+ return new Future.error(new ArgumentError(
'version and onUpgradeNeeded must be specified together'));
}
try {
@@ -386,7 +386,7 @@ class IdbFactory native "*IDBFactory" {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -401,7 +401,7 @@ class IdbFactory native "*IDBFactory" {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -414,7 +414,7 @@ class IdbFactory native "*IDBFactory" {
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -492,7 +492,7 @@ class Index native "*IDBIndex" {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -503,7 +503,7 @@ class Index native "*IDBIndex" {
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -514,7 +514,7 @@ class Index native "*IDBIndex" {
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -714,7 +714,7 @@ class ObjectStore native "*IDBObjectStore" {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -723,7 +723,7 @@ class ObjectStore native "*IDBObjectStore" {
try {
return _completeRequest($dom_clear());
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -732,7 +732,7 @@ class ObjectStore native "*IDBObjectStore" {
try {
return _completeRequest($dom_delete(key_OR_keyRange));
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -747,7 +747,7 @@ class ObjectStore native "*IDBObjectStore" {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -762,7 +762,7 @@ class ObjectStore native "*IDBObjectStore" {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -773,7 +773,7 @@ class ObjectStore native "*IDBObjectStore" {
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698