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.
2 years ago
Component: Untriaged → DOM: IndexedDB
Product: Firefox → Core
Bevis, you did work to support this in bug 1271500. Maybe you know what's up here?
I'll look into it. keep the NI on me.
Assignee: nobody → btseng
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
I'm happy to help. Thanks for jumping into it so quickly! /David
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/90691dd0694f Unify the key validation using Key::EncodeJSValInternal. r=baku
You need to log in before you can comment on or make changes to this bug.