Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: deb8f86fbe49e78729f8ce772c5168082a82dd84
      
https://github.com/WebKit/WebKit/commit/deb8f86fbe49e78729f8ce772c5168082a82dd84
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    A JSTests/stress/promise-constructor-length.js
    M Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp

  Log Message:
  -----------
  [JSC] Remove redundant eager length definition in `JSPromiseConstructor`
https://bugs.webkit.org/show_bug.cgi?id=316478

Reviewed by Yusuke Suzuki.

JSPromiseConstructor is a builtin function backed by a FunctionExecutable
whose parameter count is 1 (`Promise(executor)`), so JSFunction's lazy
property reification already provides `length` with the same value and
attributes (DontEnum | ReadOnly). The eager definition in finishCreation
is redundant. This follows the same approach as 314682@main, which
removed eager name / length definitions from Boolean / Number /
StringConstructor.

No behavior change: value, attributes, property enumeration order,
delete / redefine behavior, and bound function lengths are all identical.

Test: JSTests/stress/promise-constructor-length.js

* JSTests/stress/promise-constructor-length.js: Added.
(shouldBe):
* Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::finishCreation):

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



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

Reply via email to