RESOLVED FIXED 218697
[JSC] Support @@species in ArrayBuffer / SharedArrayBuffer slice
https://bugs.webkit.org/show_bug.cgi?id=218697
Summary [JSC] Support @@species in ArrayBuffer / SharedArrayBuffer slice
Yusuke Suzuki
Reported 2020-11-08 18:13:41 PST
[JSC] Support @@species in ArrayBuffer / SharedArrayBuffer slice
Attachments
Patch (41.86 KB, patch)
2020-11-08 18:16 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Patch (42.00 KB, patch)
2020-11-08 18:26 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Patch (44.65 KB, patch)
2020-11-08 18:37 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Patch (44.80 KB, patch)
2020-11-08 19:01 PST, Yusuke Suzuki
ross.kirsling: review+
Yusuke Suzuki
Comment 1 2020-11-08 18:16:48 PST
Yusuke Suzuki
Comment 2 2020-11-08 18:26:44 PST
Yusuke Suzuki
Comment 3 2020-11-08 18:37:40 PST
Yusuke Suzuki
Comment 4 2020-11-08 19:01:20 PST
Ross Kirsling
Comment 5 2020-11-08 19:53:16 PST
Comment on attachment 413553 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413553&action=review LGTM, based on my read of the spec & existing ArrayPrototype code and pending EWS. > Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h:33 > enum class ArrayBufferSharingMode { Should we mark this `: bool`? > Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp:59 > +enum class SpeciesConstructResult { Should we mark this `: uint8_t`? > Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp:101 > + // 16. Let new be ? Construct(ctor, « ð½(newLen) »). It's kind of surprising that these `slice` checks have are all moved into speciesConstructArrayBuffer itself, but that may be fine as long as we're sure to link to the relevant spec sections beforehand: https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice https://tc39.es/ecma262/#sec-sharedarraybuffer.prototype.slice
Yusuke Suzuki
Comment 6 2020-11-08 20:18:09 PST
Comment on attachment 413553 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413553&action=review Thanks! >> Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h:33 >> enum class ArrayBufferSharingMode { > > Should we mark this `: bool`? Nice! I'll use `uint8_t` for now since we use this as an index in some places :) >> Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp:59 >> +enum class SpeciesConstructResult { > > Should we mark this `: uint8_t`? Nice, done. >> Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp:101 >> + // 16. Let new be ? Construct(ctor, « ð½(newLen) »). > > It's kind of surprising that these `slice` checks have are all moved into speciesConstructArrayBuffer itself, but that may be fine as long as we're sure to link to the relevant spec sections beforehand: > > https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice > https://tc39.es/ecma262/#sec-sharedarraybuffer.prototype.slice Nice! I'll put these links in this function :)
Yusuke Suzuki
Comment 7 2020-11-08 21:02:49 PST
Radar WebKit Bug Importer
Comment 8 2020-11-08 21:03:19 PST
Note You need to log in before you can comment on or make changes to this bug.