Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b2cf11dd2959c8ea114ad48b2696d9677394fef1
      
https://github.com/WebKit/WebKit/commit/b2cf11dd2959c8ea114ad48b2696d9677394fef1
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-03-06 (Fri, 06 Mar 2026)

  Changed paths:
    A JSTests/stress/array-includes-undefined-hole-before-fromindex.js
    M Source/JavaScriptCore/dfg/DFGOperations.cpp
    M Source/JavaScriptCore/runtime/JSArray.cpp

  Log Message:
  -----------
  [JSC] `Array#includes(undefined, fromIndex)` should not find holes before 
fromIndex
https://bugs.webkit.org/show_bug.cgi?id=309342

Reviewed by Yusuke Suzuki.

`[, 1, 2].includes(undefined, 1)` returned true instead of false.
containsHole() scanned from index 0 instead of fromIndex.
indexOf is unaffected (it skips holes via HasProperty).

Test: JSTests/stress/array-includes-undefined-hole-before-fromindex.js

* JSTests/stress/array-includes-undefined-hole-before-fromindex.js: Added.
(shouldBe):
(throw.new.Error.test):
(throw.new.Error):
(shouldBe.test):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
(JSC::DFG::JSC_DEFINE_NOEXCEPT_JIT_OPERATION):
* Source/JavaScriptCore/runtime/JSArray.cpp:
(JSC::JSArray::fastIncludes):

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



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

Reply via email to