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

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

Issue 18577002: Reapply expanding overloaded functions into separate functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/html/dartium/html_dartium.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 c1e3bb7cccd4908da7cc1ef63f70c00310b41f69..0b00a1662693c4a6a90effbb2d02a57e80dddbf8 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -270,6 +270,31 @@ class Database extends EventTarget native "IDBDatabase" {
return _transaction(storeName_OR_storeNames, mode);
}
+ Transaction transactionStore(String storeName, String mode) {
+ if (mode != 'readonly' && mode != 'readwrite') {
+ throw new ArgumentError(mode);
+ }
+ // Try and create a transaction with a string mode. Browsers that expect a
+ // numeric mode tend to convert the string into a number. This fails
+ // silently, resulting in zero ('readonly').
+ return _transaction(storeName, mode);
+ }
+
+ Transaction transactionList(List<String> storeNames, String mode) {
+ if (mode != 'readonly' && mode != 'readwrite') {
+ throw new ArgumentError(mode);
+ }
+ List storeNames_1 = convertDartToNative_StringArray(storeNames);
+ return _transaction(storeNames_1, mode);
+ }
+
+ Transaction transactionStores(DomStringList storeNames, String mode) {
+ if (mode != 'readonly' && mode != 'readwrite') {
+ throw new ArgumentError(mode);
+ }
+ return _transaction(storeNames, mode);
+ }
+
@JSName('transaction')
Transaction _transaction(stores, mode) native;
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.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