Bug 297194

Summary: [JSC] Fix duplicate `iterator.next` property access in `Set#union`
Product: WebKit Reporter: Sosuke Suzuki <sosuke>
Component: JavaScriptCoreAssignee: Sosuke Suzuki <sosuke>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Sosuke Suzuki
Reported 2025-08-10 08:30:05 PDT
`Set#union` C++ implementation added by https://commits.webkit.org/298316@main was accessing `iterator.next` twice instead of once, causing test262 failures[1]. This patch fixes by using `iteratorDirect` with `forEachInIterationRecord` to access the property only once. [1]: https://build.webkit.org/#/builders/1232/builds/9714
Attachments
Sosuke Suzuki
Comment 1 2025-08-10 08:32:36 PDT
EWS
Comment 2 2025-08-10 10:51:30 PDT
Committed 298486@main (a56c848d924c): <https://commits.webkit.org/298486@main> Reviewed commits have been landed. Closing PR #49198 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-08-10 10:52:12 PDT
Note You need to log in before you can comment on or make changes to this bug.