Closed
Bug 1508981
Opened 6 years ago
Closed 4 years ago
Add/Put should throw TypeError if the arrayBuffer is detached
Categories
(Core :: Storage: IndexedDB, enhancement, P2)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox65 | --- | affected |
People
(Reporter: baku, Assigned: baku)
Details
Attachments
(1 file, 1 obsolete file)
7.23 KB,
patch
|
Details | Diff | Splinter Review |
http://w3c.github.io/IndexedDB/#convert-a-value-to-a-key "If input is a buffer source type - Let octets be the result of running the steps to get a copy of the bytes held by the buffer source input. Rethrow any exceptions." https://heycam.github.io/webidl/#es-buffer-source-types "If IsDetachedBuffer(O), then throw a TypeError."
Assignee | ||
Comment 1•6 years ago
|
||
Would be nice to use ErrorResult::ThrowTypeError<...> but that would require a refactoring of the error reporting in Key.cpp
Attachment #9026664 -
Flags: review?(bugmail)
Assignee | ||
Comment 2•6 years ago
|
||
Attachment #9026664 -
Attachment is obsolete: true
Attachment #9026664 -
Flags: review?(bugmail)
Attachment #9026668 -
Flags: review?(bugmail)
Updated•6 years ago
|
Priority: -- → P2
Comment 3•6 years ago
|
||
Comment on attachment 9026668 [details] [diff] [review] detached.patch I'm going to transfer this review to Jan since he's touching other things in this area. The review may be delayed a bit because of that.
Attachment #9026668 -
Flags: review?(bugmail) → review?(jvarga)
Comment 4•5 years ago
|
||
This can be a good bug for you. Please refresh the patch and I'll review it.
Flags: needinfo?(ssengupta)
Flags: needinfo?(sgiesecke)
Updated•5 years ago
|
Attachment #9026668 -
Flags: review?(jvarga)
Comment 5•5 years ago
|
||
When I read the spec from here: https://heycam.github.io/webidl/#es-buffer-source-types, it says something different now
If IsDetachedBuffer(arrayBuffer) is true, then return the empty byte sequence.
Perhaps the course of action would be to first revise the tests if necessary, and if the tests then fail, then file a different bug?
Flags: needinfo?(ssengupta) → needinfo?(jvarga)
Comment 6•5 years ago
|
||
Indeed, the wording of this was changed in January by :annevk via https://github.com/heycam/webidl/pull/605
Flags: needinfo?(sgiesecke)
Comment 9•4 years ago
|
||
I find no discrepancy between spec. and current code here. :baku, would you close this bug then?
Flags: needinfo?(ssengupta) → needinfo?(amarchesini)
Assignee | ||
Comment 10•4 years ago
|
||
Spec has changed.
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(amarchesini)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•