Closed
Bug 1313112
Opened 7 years ago
Closed 7 years ago
Deprecate and remove ArrayBuffer.slice
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: evilpie, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file)
5.12 KB,
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
Another "generic" function that was added to the constructor. I think this method is relatively unknown, because it's not documented on MDN and almost nobody really needs to work on ArrayBuffers. We should land a warning in this cycle and then remove it in the next cycle.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → evilpies
Updated•7 years ago
|
Keywords: dev-doc-needed,
site-compat
Assignee | ||
Updated•7 years ago
|
Summary: Deprecate and remove ArrayBuffers.slice → Deprecate and remove ArrayBuffer.slice
Comment 1•7 years ago
|
||
Jukka, are you using this? I ask because you made some noises about SharedArrayBuffer's slice (though that could have been the instance method, not the static method).
Flags: needinfo?(jujjyl)
Comment 2•7 years ago
|
||
(In reply to Tom Schuster [:evilpie] from comment #0) > Another "generic" function that was added to the constructor. I think this > method is relatively unknown, because it's not documented on MDN and almost > nobody really needs to work on ArrayBuffers. > > We should land a warning in this cycle and then remove it in the next cycle. Is this the function that is being removed? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/slice . It is documented on MDN. Why would we remove that, it seems like an useful functionality? (In reply to Lars T Hansen [:lth] from comment #1) > Jukka, are you using this? I ask because you made some noises about > SharedArrayBuffer's slice (though that could have been the instance method, > not the static method). We are using that, and have a polyfill to add SharedArrayBuffer.slice() as well. I don't know off the top of my head though what the extent of our usage of that is, and if we could remove all uses. However, it's an useful function, I don't think we should remove that? (What's the alternative code form?) Since it is documented, we should also modify the documentation page to show that it's deprecated and point to the alternative code paths. Also, is there a standards body discussion about this somewhere? (Or perhaps I missed the point altogether, and it's about some other function signature and not the exact one I linked to?)
Flags: needinfo?(jujjyl)
Comment 3•7 years ago
|
||
It's not about prototype's property that's in the MDN page, but constructor's property. so, literally "ArrayBuffer.slice".
Comment 4•7 years ago
|
||
Yes, importantly: ArrayBuffer.prototype.slice is in Ecma262 SharedArrayBuffer.prototype.slice is in the SAB+Atomics proposal (and now in Firefox) ArrayBuffer.slice is a Firefox-only static method with a different signature; a dead-end feature There is no SharedArrayBuffer.slice
Comment 5•7 years ago
|
||
Thanks, that makes sense. Yeah, we don't use ArrayBuffer.slice(myBuffer, ...), but only myBuffer.slice(...), so removing the static version sounds ok to me.
Assignee | ||
Comment 6•7 years ago
|
||
The warning patch landed in 52, should we risk removing this in 53?
Comment 7•7 years ago
|
||
Posted the site compatibility doc: https://www.fxsitecompat.com/en-CA/docs/2016/arraybuffer-slice-will-be-removed/
Assignee | ||
Comment 8•7 years ago
|
||
I haven't actually tested this, because of my laptop situation, but I am pretty optimistic this will work.
Attachment #8817697 -
Flags: review?(arai.unmht)
Comment 9•7 years ago
|
||
Comment on attachment 8817697 [details] [diff] [review] Remove non-standard static ArrayBuffers.slice (not ArrayBuffer.prototype.slice) Review of attachment 8817697 [details] [diff] [review]: ----------------------------------------------------------------- looks good :)
Attachment #8817697 -
Flags: review?(arai.unmht) → review+
Comment 10•7 years ago
|
||
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/26d101a9edac Remove non-standard static ArrayBuffers.slice. r=arai
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/26d101a9edac
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment 12•7 years ago
|
||
Documented it at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer#Methods_2 and added the related compatibility information. And also added a release note at https://developer.mozilla.org/en-US/Firefox/Releases/53#JavaScript. Sebastian
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•