Closed Bug 1268380 Opened 8 years ago Closed 8 years ago

Exception Precedence of ​ SyntaxError in IDBObjectStore.createIndex() is Inconsistent to the one in IDB Spec v2.

Categories

(Core :: Storage: IndexedDB, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: bevis, Assigned: bevis)

Details

(Whiteboard: [tw-dom] btpp-active)

Attachments

(2 files, 1 obsolete file)

The priority of SyntaxError in IDBObjectStore.createIndex() is lower than ConstraintError as specified in IDB Spec v2 [1]. However, in gecko, SyntaxError is the first one to be validated in IDBObjectStore.createIndex()[2][3]. [1] http://w3c.github.io/IndexedDB/#dom-idbobjectstore-createindex [2] https://hg.mozilla.org/mozilla-central/annotate/fc15477ce628599519cb0055f52cc195d640dc94/dom/indexedDB/IDBObjectStore.cpp#l1827 [3] https://hg.mozilla.org/mozilla-central/annotate/fc15477ce628599519cb0055f52cc195d640dc94/dom/indexedDB/IDBObjectStore.cpp#l1846
Whiteboard: [tw-dom] → [tw-dom] btpp-active
Unify 2 IDBObjectStore::createIndex() methods with |(DOMString or sequence<DOMString>) keyPath| to check the syntax of keyPath after validating index name.
Attachment #8746953 - Flags: review?(khuey)
Status: NEW → ASSIGNED
(In reply to Bevis Tseng[:bevistseng][:btseng] from comment #2) > Created attachment 8746953 [details] [diff] [review] > (v1) Patch: Lower the precedence of SyntaxError next to ConstraintError in > IDBObjectStore::CreateIndex(). > > Unify 2 IDBObjectStore::createIndex() methods with |(DOMString or > sequence<DOMString>) keyPath| to check the syntax of keyPath after > validating index name. DataStore was removed in Bug 1261009, so we could discard the change in DataStoreDB.cpp.
Comment on attachment 8746953 [details] [diff] [review] (v1) Patch: Lower the precedence of SyntaxError next to ConstraintError in IDBObjectStore::CreateIndex(). Review of attachment 8746953 [details] [diff] [review]: ----------------------------------------------------------------- Can you add a web-platform-test? (Or maybe ask jsbell if Google has one already?)
Attachment #8746953 - Flags: review?(khuey) → review+
Discard the change of DataStoreDB.cpp done in v1.
Attachment #8746953 - Attachment is obsolete: true
Attachment #8749222 - Flags: review+
Add Web Platform Test for the Exception Precedence in IDBObjectStore::createIndex().
Attachment #8749225 - Flags: review?(khuey)
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: