[webkit-changes] [WebKit/WebKit] c15734: [JSC] Object.defineProperties fast path causes val...

Yusuke Suzuki noreply at github.com
Tue Dec 26 22:16:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c157345d2b9c5b8e4a618509380fdfcaa99e8de7
      https://github.com/WebKit/WebKit/commit/c157345d2b9c5b8e4a618509380fdfcaa99e8de7
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-12-26 (Tue, 26 Dec 2023)

  Changed paths:
    A JSTests/stress/object-define-properties-index-adjust.js
    M Source/JavaScriptCore/runtime/ObjectConstructor.cpp

  Log Message:
  -----------
  [JSC] Object.defineProperties fast path causes values to be assigned to incorrect property
https://bugs.webkit.org/show_bug.cgi?id=266611
rdar://120137648

Reviewed by Justin Michaud.

Since we already put descriptor which caused side effect for retrieval, we should increment index.
We also optimize a bit with UNLIKELY and reserveInitialCapacity.

* JSTests/stress/object-define-properties-index-adjust.js: Added.
(shouldBe):
(InterfaceConstructor.prototype.two):
(InterfaceConstructor):
(Interface):
* Source/JavaScriptCore/runtime/ObjectConstructor.cpp:
(JSC::definePropertiesSlow):
(JSC::defineProperties):

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




More information about the webkit-changes mailing list