Closed
Bug 1336944
Opened 8 years ago
Closed 8 years ago
Change Sqlite.jsm to bind TypedArrays as Blobs, not common Arrays.
Categories
(Toolkit :: Storage, defect, P1)
Toolkit
Storage
Tracking
()
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox52 | --- | unaffected |
firefox53 | + | fixed |
firefox54 | + | fixed |
People
(Reporter: mak, Assigned: mak)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-review-board-request
|
Gijs
:
review+
gchang
:
approval-mozilla-aurora+
|
Details |
[Tracking Requested - why for this release]: [Tracking Requested - why for this release]: Currently binding an Array tries to bind it as a Blob. This clashes with bug 483318, that would like to bind Arrays for IN clauses. We should change Sqlite.jsm to bind only typedArrays as blobs. We should fix this before FF53 ships, to avoid creating previous usage of Array to bind blobs.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8834072 [details] Bug 1336944 - Change Sqlite.jsm to bind TypedArrays as Blobs, not common Arrays. https://reviewboard.mozilla.org/r/110154/#review111496 So there are no non-test consumers right now? Interesting...
Attachment #8834072 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8834072 [details] Bug 1336944 - Change Sqlite.jsm to bind TypedArrays as Blobs, not common Arrays. https://reviewboard.mozilla.org/r/110154/#review111500 ::: toolkit/modules/tests/xpcshell/test_sqlite.js:1106 (Diff revision 1) > const bindings = [ > { > null_col: null, > integer_col: 12345, > text_col: "qwerty", > - blob_col: new Array(256).fill(undefined).map( (value, index) => index % 256 ), > + blob_col: new Uint8Array(256).fill(undefined).map( (value, index) => index % 256 ), Does this work, and/or is filling it with undefined here useful, given the map() call? If it is, shouldn't we fill with 0?
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to :Gijs from comment #4) > Does this work, and/or is filling it with undefined here useful, given the > map() call? If it is, shouldn't we fill with 0? Yeah, it's the same, afaict: new Uint8Array(10).fill(undefined) > Uint8Array [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] I will just change undefined with 0, for clarity.
Comment hidden (mozreview-request) |
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/cf0424523e69 Change Sqlite.jsm to bind TypedArrays as Blobs, not common Arrays. r=Gijs
Comment 9•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cf0424523e69
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8834072 [details] Bug 1336944 - Change Sqlite.jsm to bind TypedArrays as Blobs, not common Arrays. Approval Request Comment [Feature/Bug causing the regression]: bug 1247602 [User impact if declined]: We'd be shipping an API that is changing the next version [Is this code covered by automated tests?]: yes [Has the fix been verified in Nightly?]: not yet [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: no [Why is the change risky/not risky?]: just changing Array to Uint8Array, new API [String changes made/needed]: none
Attachment #8834072 -
Flags: approval-mozilla-aurora?
Comment 11•8 years ago
|
||
Comment on attachment 8834072 [details] Bug 1336944 - Change Sqlite.jsm to bind TypedArrays as Blobs, not common Arrays. Ship new API. Aurora53+.
Attachment #8834072 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 12•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/eae7e45deb55
You need to log in
before you can comment on or make changes to this bug.
Description
•