Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 74119f1b889edd14f8d72ea1dd3a92a7f7e63ad6
https://github.com/WebKit/WebKit/commit/74119f1b889edd14f8d72ea1dd3a92a7f7e63ad6
Author: Shu-yu Guo <[email protected]>
Date: 2025-12-22 (Mon, 22 Dec 2025)
Changed paths:
A JSTests/stress/promise-any-creates-aggregateerror-directly.js
M Source/JavaScriptCore/runtime/AggregateError.cpp
M Source/JavaScriptCore/runtime/AggregateError.h
M Source/JavaScriptCore/runtime/AggregateErrorConstructor.cpp
M Source/JavaScriptCore/runtime/JSMicrotask.cpp
M Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp
Log Message:
-----------
[JSC] Promise.any should create AggregateError directly
https://bugs.webkit.org/show_bug.cgi?id=304611
rdar://167013937
Reviewed by Dan Hecht and Yusuke Suzuki.
Per spec, Promise.any creates AggregateErrors directly [1] without going
through the user-exposed constructor. In particular this means there's no user
code called for argument coercion. The current implementation goes through the
user-exposed constructor which incorrectly calls user code, like going through
Array.prototype[Symbol.iterator].
This PR fixes it and splits the existing createAggregateError function into a
constructAggregateError, which handles argument coercion, and refactors the
existing createAggregateError to not call into user code.
Test: JSTests/stress/promise-any-creates-aggregateerror-directly.js
[1] https://tc39.es/ecma262/#sec-performpromiseany 5.b.ii
Canonical link: https://commits.webkit.org/304884@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications