Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 131349b225e396d47790e262dcd50d4129f54998
      
https://github.com/WebKit/WebKit/commit/131349b225e396d47790e262dcd50d4129f54998
  Author: Shu-yu Guo <[email protected]>
  Date:   2026-03-17 (Tue, 17 Mar 2026)

  Changed paths:
    A JSTests/stress/concat-spreadable-own-indexed-accessor.js
    M Source/JavaScriptCore/runtime/ArrayPrototype.cpp

  Log Message:
  -----------
  [JSC] Check for all indexed accessors in Array.p.concat
https://bugs.webkit.org/show_bug.cgi?id=310065
rdar://172237596

Reviewed by Yusuke Suzuki.

Array.prototype.concat has a fast path that assumes the `this` array, if not
concat-spreadable, stays non-concat-spreadable. This is invalidated if it can
have indexed accessors. The current code guards against indexed accessors
incorrectly by using `shouldUseSlowPut`, which only checks against indexed
accessors on the prototype chain for the put case. This PR fixes it by using
`mayInterceptIndexedAccesses` which also considers own indexed accessors.

Test: JSTests/stress/concat-spreadable-own-indexed-accessor.js
* JSTests/stress/concat-spreadable-own-indexed-accessor.js: Added.
* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::concatAppendOne):
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/309423@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to