Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: da75c48c453bb822707d5873b6d962c62582138a
      
https://github.com/WebKit/WebKit/commit/da75c48c453bb822707d5873b6d962c62582138a
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-09-19 (Sat, 19 Sep 2026)

  Changed paths:
    A JSTests/stress/array-buffer-slice-species-constructor.js
    M JSTests/test262/expectations.yaml
    M Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp
    M Source/JavaScriptCore/runtime/JSArrayBufferPrototypeInlines.h

  Log Message:
  -----------
  [JSC] Fix ArrayBuffer.prototype.slice's SpeciesConstructor
https://bugs.webkit.org/show_bug.cgi?id=324619
rdar://187853060

Reviewed by Sosuke Suzuki.

Fix two issues.

1. speciesWatchpointIsValid should be used only when thisObject's realm
   is the current lexical realm. This is already done in TypedArray case.
2. @@species was never read when O.constructor was any realm's ArrayBuffer
   constructor in the slow path.

Test: JSTests/stress/array-buffer-slice-species-constructor.js

* JSTests/stress/array-buffer-slice-species-constructor.js: Added.
(shouldBe):
(Subclass):
(get return):
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferSpeciesConstructorSlow):
* Source/JavaScriptCore/runtime/JSArrayBufferPrototypeInlines.h:
(JSC::speciesWatchpointIsValid):
(JSC::arrayBufferSpeciesConstructor):

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



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

Reply via email to