[webkit-changes] [WebKit/WebKit] dd4f45: [JSC] WeakMap / WeakSet constructor should accept ...

Yusuke Suzuki noreply at github.com
Wed Nov 16 17:11:23 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dd4f45d5e334782e7e809d3a28be5d1f04bd2f5a
      https://github.com/WebKit/WebKit/commit/dd4f45d5e334782e7e809d3a28be5d1f04bd2f5a
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    A JSTests/stress/weak-map-constructor-symbol.js
    A JSTests/stress/weak-set-constructor-symbol.js
    M Source/JavaScriptCore/runtime/WeakMapConstructor.cpp
    M Source/JavaScriptCore/runtime/WeakMapPrototype.cpp
    M Source/JavaScriptCore/runtime/WeakSetConstructor.cpp
    M Source/JavaScriptCore/runtime/WeakSetPrototype.cpp

  Log Message:
  -----------
  [JSC] WeakMap / WeakSet constructor should accept symbols
https://bugs.webkit.org/show_bug.cgi?id=247997
rdar://102440538

Reviewed by Alexey Shvayka.

This patch fixes missing handling of symbols in WeakMap / WeakSet constructors.

* JSTests/stress/weak-map-constructor-symbol.js: Added.
(shouldBe):
(shouldThrow):
* JSTests/stress/weak-set-constructor-symbol.js: Added.
(shouldBe):
(shouldThrow):
(test.set shouldThrow):
* Source/JavaScriptCore/runtime/WeakMapConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/WeakMapPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/WeakSetConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/WeakSetPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

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




More information about the webkit-changes mailing list