[webkit-reviews] review granted: [Bug 218697] [JSC] Support @@species in ArrayBuffer / SharedArrayBuffer slice : [Attachment 413553] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 8 19:53:16 PST 2020


Ross Kirsling <ross.kirsling at sony.com> has granted Yusuke Suzuki
<ysuzuki at apple.com>'s request for review:
Bug 218697: [JSC] Support @@species in ArrayBuffer / SharedArrayBuffer slice
https://bugs.webkit.org/show_bug.cgi?id=218697

Attachment 413553: Patch

https://bugs.webkit.org/attachment.cgi?id=413553&action=review




--- Comment #5 from Ross Kirsling <ross.kirsling at sony.com> ---
Comment on attachment 413553
  --> https://bugs.webkit.org/attachment.cgi?id=413553
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


More information about the webkit-reviews mailing list