[webkit-reviews] review granted: [Bug 234990] JSArray::fastSlice() should not convert the source from CoW : [Attachment 448806] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 10 15:56:23 PST 2022

Yusuke Suzuki <ysuzuki at apple.com> has granted Alexey Shvayka
<ashvayka at apple.com>'s request for review:
Bug 234990: JSArray::fastSlice() should not convert the source from CoW

Attachment 448806: Patch


--- Comment #7 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 448806
  --> https://bugs.webkit.org/attachment.cgi?id=448806

View in context: https://bugs.webkit.org/attachment.cgi?id=448806&action=review

r=me with comment.

> JSTests/stress/array-slice-cow.js:11
> +    return slice;

Can we have a test checking slice is non CoW?

> JSTests/stress/array-slice-cow.js:20
> +    return slice;


> JSTests/stress/array-slice-cow.js:29
> +    return slice;


> Source/JavaScriptCore/runtime/JSArray.cpp:736
> +    auto arrayType = (source->indexingMode() & ~CopyOnWrite) | IsArray;

We should take indexingType() instead of indexingMode(). The difference between
IndexingType and IndexingMode is CoW bit.

More information about the webkit-reviews mailing list