Closed
Bug 1395071
Opened 7 years ago
Closed 7 years ago
IndexedDB2.0: IDBObjectStore.get() and delete() fails if argument is a binary key
Categories
(Core :: Storage: IndexedDB, defect)
Tracking
()
RESOLVED
FIXED
mozilla57
People
(Reporter: david.fahlander, Assigned: bevis)
Details
Attachments
(1 file)
3.40 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36 OPR/47.0.2631.71 Steps to reproduce: Call IDBObjectStore.get() or IDBObjectStore.delete() using a typed array or an array buffer. It throws directly. A repro is here: http://dexie.org/test/firefox-bug-binary-keys/ Actual results: The methods throws DataError even though binary keys should be allowed also for primary keys. Expected results: I should have been able to get() or delete() an object by its binary primary key.
Updated•7 years ago
|
Component: Untriaged → DOM: IndexedDB
Product: Firefox → Core
Comment 1•7 years ago
|
||
Bevis, you did work to support this in bug 1271500. Maybe you know what's up here?
Flags: needinfo?(btseng)
Assignee | ||
Comment 3•7 years ago
|
||
Thanks for reporting this, David. After further review, I found that there is another place(IDBKeyRange::FromJSVal) to check the type of the passed JS value that wasn't identified when fixing bug 1271500: http://searchfox.org/mozilla-central/rev/51b3d67a5ec1758bd2fe7d7b6e75ad6b6b5da223/dom/indexedDB/IDBKeyRange.cpp#101 I'll update a fix to unify the type checking in single place(Key::EncodeJSValInternal): http://searchfox.org/mozilla-central/rev/51b3d67a5ec1758bd2fe7d7b6e75ad6b6b5da223/dom/indexedDB/Key.cpp#213
Flags: needinfo?(btseng)
Assignee | ||
Updated•7 years ago
|
status-firefox55:
--- → affected
status-firefox56:
--- → affected
status-firefox57:
--- → affected
status-firefox-esr52:
--- → affected
Reporter | ||
Comment 4•7 years ago
|
||
I'm happy to help. Thanks for jumping into it so quickly! /David
Assignee | ||
Comment 5•7 years ago
|
||
Attachment #8903505 -
Flags: review?(amarchesini)
Comment 6•7 years ago
|
||
Comment on attachment 8903505 [details] [diff] [review] (v1) Patch: Unify the key validation using Key::EncodeJSValInternal. Review of attachment 8903505 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/indexedDB/IDBKeyRange.cpp @@ +95,3 @@ > > + // Unwrap an IDBKeyRange object if possible. > + if (aVal.isObject() && if (obj && ...
Attachment #8903505 -
Flags: review?(amarchesini) → review+
Pushed by btseng@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/90691dd0694f Unify the key validation using Key::EncodeJSValInternal. r=baku
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/90691dd0694f
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•7 years ago
|
Comment 9•7 years ago
|
||
Too late for 56. Mass won't fix for 56.
You need to log in
before you can comment on or make changes to this bug.
Description
•