Note: There are a few cases of duplicates in user autocompletion which are being worked on.

IndexedDB: Don't throw if there are unknown properties in the options objects to createObjectStore/createIndex

RESOLVED FIXED

Status

()

Core
DOM: IndexedDB
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

({addon-compat, dev-doc-complete})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

12.99 KB, patch
Ben Turner (not reading bugmail, use the needinfo flag!)
: review+
Details | Diff | Splinter Review
Such properties should just be ignored.
Created attachment 572722 [details] [diff] [review]
Patch to fix

This fixes things.

Turns out that "" is actually a valid key path and simply refers to the value itself. So it actually makes sense to use that on an objectStore which turns the store into a set.
Assignee: nobody → jonas
Attachment #572722 - Flags: review?(bent.mozilla)
Comment on attachment 572722 [details] [diff] [review]
Patch to fix

Review of attachment 572722 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!
Attachment #572722 - Flags: review?(bent.mozilla) → review+
Checked in https://hg.mozilla.org/mozilla-central/rev/e73f34291541

Thanks for the quick review!
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Keywords: dev-doc-needed
I've updated:
https://developer.mozilla.org/en/IndexedDB/IDBDatabase#section_12
https://developer.mozilla.org/en/IndexedDB/IDBObjectStore#section_15

and a mention in 
https://developer.mozilla.org/en/Firefox_10_for_developers

(Sidenote: the latest draft use a different type for passing the parameter, but I wasn't able to find a bug to adapt Firefox implementation)
Keywords: dev-doc-needed → addon-compat, dev-doc-complete
Note that the fact that we don't implement dictionary types yet is not detectable from script; they are just specese to refer to simple JS objects, so I don't think the warnings are necessary.
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla10 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.