[webkit-changes] [WebKit/WebKit] a3e7b8: [JSC] Implement SetterThatIgnoresPrototypeProperti...
Commit Queue
noreply at github.com
Sat Oct 5 19:08:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a3e7b8f85e8fb9444ed717f3d494052adacddfef
https://github.com/WebKit/WebKit/commit/a3e7b8f85e8fb9444ed717f3d494052adacddfef
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2024-10-05 (Sat, 05 Oct 2024)
Changed paths:
M JSTests/stress/iterator-prototype-constructor-setter.js
M JSTests/stress/iterator-prototype-to-string-tag-basic-setter.js
M Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp
M Source/JavaScriptCore/runtime/JSObject.cpp
M Source/JavaScriptCore/runtime/JSObject.h
Log Message:
-----------
[JSC] Implement SetterThatIgnoresPrototypeProperties() as specified in Iterator helpers proposal
https://bugs.webkit.org/show_bug.cgi?id=280705
<rdar://problem/137078675>
Reviewed by Yusuke Suzuki.
Unfortunately, putDirect() is not enough to implement SetterThatIgnoresPrototypeProperties() [1]:
* if the property is absent, and object is non-extensible, a TypeError should be thrown;
* if the property is present, its descriptor should not be overwritten (like putDirect() does),
and the setter, if present, should be invoked.
Also, SetterThatIgnoresPrototypeProperties() should invoke non-ordinary [[GetOwnProperty]], [[Set]],
and [[DefineOwnProperty]] methods because it can be called on any object, including a ProxyObject.
[1]: https://tc39.es/proposal-iterator-helpers/#sec-SetterThatIgnoresPrototypeProperties (steps 3-5)
* JSTests/stress/iterator-prototype-constructor-setter.js:
* JSTests/stress/iterator-prototype-to-string-tag-basic-setter.js:
* Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_SETTER):
* Source/JavaScriptCore/runtime/JSObject.cpp:
(JSC::setterThatIgnoresPrototypeProperties):
* Source/JavaScriptCore/runtime/JSObject.h:
Canonical link: https://commits.webkit.org/284737@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list