Index: modules/indexeddb/IDBObjectStore.idl |
diff --git a/modules/indexeddb/IDBObjectStore.idl b/modules/indexeddb/IDBObjectStore.idl |
index 2afdfe4ab7b65b920baa1bd956dda0360f6d5439..ae4fc4f68d1ac0875f671b07a8ce5f55983cac37 100644 |
--- a/modules/indexeddb/IDBObjectStore.idl |
+++ b/modules/indexeddb/IDBObjectStore.idl |
@@ -23,36 +23,33 @@ |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-// https://dvcs.w3.org/hg/IndexedDB/raw-file/default/Overview.html#idl-def-IDBObjectStore |
- |
-// FIXME: de-duplicate this when crbug.com/390758 is fixed. |
-enum IDBCursorDirection { |
- "next", |
- "nextunique", |
- "prev", |
- "prevunique" |
-}; |
+// https://w3c.github.io/IndexedDB/#idl-def-IDBObjectStore |
[ |
+ Exposed=(Window,Worker), |
GarbageCollected, |
] interface IDBObjectStore { |
- readonly attribute DOMString? name; |
+ readonly attribute DOMString name; |
[CallWith=ScriptState] readonly attribute any keyPath; |
- readonly attribute DOMStringList indexNames; |
+ [Measure] readonly attribute DOMStringList indexNames; |
readonly attribute IDBTransaction transaction; |
readonly attribute boolean autoIncrement; |
[CallWith=ScriptState, RaisesException] IDBRequest put(any value, [Default=Undefined] optional any key); |
[CallWith=ScriptState, RaisesException] IDBRequest add(any value, [Default=Undefined] optional any key); |
[CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key); |
- [CallWith=ScriptState, RaisesException] IDBRequest get(any key); |
[CallWith=ScriptState, RaisesException] IDBRequest clear(); |
- [CallWith=ScriptState, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, optional DOMString direction = "next"); |
+ [CallWith=ScriptState, RaisesException] IDBRequest get(any key); |
+ // TODO(cmumford): 0xFFFFFFFF is not necessary. Remove once crbug.com/335871 is fixed. |
+ [CallWith=ScriptState, RaisesException, RuntimeEnabled=IndexedDBExperimental] IDBRequest getAll([Default=Undefined] optional any range, optional unsigned long maxCount = 0xFFFFFFFF); |
+ // TODO(cmumford): Standardize or eventually remove. More info at: |
+ // https://w3c.github.io/IndexedDB/#widl-IDBObjectStore-getAllKeys-IDBRequest-any-query-unsigned-long-count |
+ // TODO(cmumford): 0xFFFFFFFF is not necessary. Remove once crbug.com/335871 is fixed. |
+ [CallWith=ScriptState, RaisesException, RuntimeEnabled=IndexedDBExperimental] IDBRequest getAllKeys([Default=Undefined] optional any range, optional unsigned long maxCount = 0xFFFFFFFF); |
+ [CallWith=ScriptState, RaisesException] IDBRequest count([Default=Undefined] optional any key); |
+ [CallWith=ScriptState, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, optional IDBCursorDirection direction = "next"); |
[CallWith=ScriptState, RaisesException, RuntimeEnabled=IndexedDBExperimental] IDBRequest openKeyCursor([Default=Undefined] optional any range, optional IDBCursorDirection direction = "next"); |
- // FIXME: should be union type http://crbug.com/240176 |
- [CallWith=ScriptState, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, optional IDBIndexParameters options); |
- [CallWith=ScriptState, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional IDBIndexParameters options); |
+ [CallWith=ScriptState, RaisesException] IDBIndex createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters options); |
[RaisesException] IDBIndex index(DOMString name); |
[RaisesException] void deleteIndex(DOMString name); |
- [CallWith=ScriptState, RaisesException] IDBRequest count([Default=Undefined] optional any key); |
}; |