[webkit-changes] [WebKit/WebKit] 5a71a3: [JSC] Array.from() and friends should invoke `docu...
Commit Queue
noreply at github.com
Tue Oct 8 20:59:40 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5a71a33b9e2231e6721b8398946acc01896ff24f
https://github.com/WebKit/WebKit/commit/5a71a33b9e2231e6721b8398946acc01896ff24f
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
A JSTests/stress/regress-281037.js
M Source/JavaScriptCore/builtins/ArrayConstructor.js
M Source/JavaScriptCore/builtins/TypedArrayConstructor.js
Log Message:
-----------
[JSC] Array.from() and friends should invoke `document.all` passed as a mapper
https://bugs.webkit.org/show_bug.cgi?id=281037
<rdar://problem/137490201>
Reviewed by Yijia Huang.
After the parameter validation, Array.from() and friends deal with either callable `mapFn` or `undefined`.
However, the assumption that all callable objects are truthy is incorrect because of `document.all` [1].
This patch tightens the checks to use strict equality, aligning JSC with the spec, V8, and SpiderMonkey.
[1]: https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-to-boolean
* JSTests/stress/regress-281037.js: Added.
* Source/JavaScriptCore/builtins/ArrayConstructor.js:
(from):
(linkTimeConstant.visibility.PrivateRecursive.async defaultAsyncFromAsyncIterator):
(linkTimeConstant.visibility.PrivateRecursive.async defaultAsyncFromAsyncArrayLike):
* Source/JavaScriptCore/builtins/TypedArrayConstructor.js:
(from):
Canonical link: https://commits.webkit.org/284868@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