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

Unified Diff: sdk/lib/indexed_db/dartium/indexed_db_dartium.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/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6fad318309025870988630df026866dcd88418f5..87c0ebeb74ad4596a2f6b83c05d8685d3c54ffc9 100644
--- a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
+++ b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
@@ -45,7 +45,7 @@ class Cursor extends NativeFieldWrapperClass1 {
try {
return _completeRequest($dom_delete());
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -54,7 +54,7 @@ class Cursor extends NativeFieldWrapperClass1 {
try {
return _completeRequest($dom_update(value));
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -261,7 +261,7 @@ class IdbFactory extends NativeFieldWrapperClass1 {
{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 {
@@ -280,7 +280,7 @@ class IdbFactory extends NativeFieldWrapperClass1 {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -295,7 +295,7 @@ class IdbFactory extends NativeFieldWrapperClass1 {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -308,7 +308,7 @@ class IdbFactory extends NativeFieldWrapperClass1 {
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -388,7 +388,7 @@ class Index extends NativeFieldWrapperClass1 {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -399,7 +399,7 @@ class Index extends NativeFieldWrapperClass1 {
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -410,7 +410,7 @@ class Index extends NativeFieldWrapperClass1 {
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -749,7 +749,7 @@ class ObjectStore extends NativeFieldWrapperClass1 {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -758,7 +758,7 @@ class ObjectStore extends NativeFieldWrapperClass1 {
try {
return _completeRequest($dom_clear());
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -767,7 +767,7 @@ class ObjectStore extends NativeFieldWrapperClass1 {
try {
return _completeRequest($dom_delete(key_OR_keyRange));
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -782,7 +782,7 @@ class ObjectStore extends NativeFieldWrapperClass1 {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -797,7 +797,7 @@ class ObjectStore extends NativeFieldWrapperClass1 {
}
return _completeRequest(request);
} catch (e, stacktrace) {
- return new Future.immediateError(e, stacktrace);
+ return new Future.error(e, stacktrace);
}
}
@@ -808,7 +808,7 @@ class ObjectStore extends NativeFieldWrapperClass1 {
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/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698