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

Unified Diff: lib/html/dartium/html_dartium.dart

Issue 10379008: Revert "Forbid zero argument variant of IDBRequest.openCursor." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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:
Download patch
« no previous file with comments | « lib/dom/idl/dart/dart.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index 0e238ca7e0b42ee680d9d570e88144b575860ea8..081c22b10fd43da51d11a777821915cbc1117d7a 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -10485,12 +10485,27 @@ class _IDBObjectStoreImpl extends _DOMTypeBase implements IDBObjectStore {
return _wrap(_ptr.index(_unwrap(name)));
}
- IDBRequest openCursor([IDBKeyRange range = null, int direction = null]) {
- if (direction === null) {
- return _wrap(_ptr.openCursor(_unwrap(range)));
+ IDBRequest openCursor([key_OR_range = null, int direction = null]) {
+ if (key_OR_range === null) {
+ if (direction === null) {
+ return _wrap(_ptr.openCursor());
+ }
} else {
- return _wrap(_ptr.openCursor(_unwrap(range), _unwrap(direction)));
+ if (key_OR_range is IDBKeyRange) {
+ if (direction === null) {
+ return _wrap(_ptr.openCursor(_unwrap(key_OR_range)));
+ } else {
+ return _wrap(_ptr.openCursor(_unwrap(key_OR_range), _unwrap(direction)));
+ }
+ } else {
+ if (direction === null) {
+ return _wrap(_ptr.openCursor(_unwrap(key_OR_range)));
+ } else {
+ return _wrap(_ptr.openCursor(_unwrap(key_OR_range), _unwrap(direction)));
+ }
+ }
}
+ throw "Incorrect number or type of arguments";
}
IDBRequest put(/*SerializedScriptValue*/ value, [/*IDBKey*/ key = null]) {
« no previous file with comments | « lib/dom/idl/dart/dart.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698