<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>289430</bug_id>
          
          <creation_ts>2025-03-09 07:32:55 -0700</creation_ts>
          <short_desc>[JSC] `Set#union` and `Set#synmmetric` should get `next` before cloning `this`</short_desc>
          <delta_ts>2025-03-09 20:17:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sosuke Suzuki">sosuke</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2101742</commentid>
    <comment_count>0</comment_count>
    <who name="Sosuke Suzuki">sosuke</who>
    <bug_when>2025-03-09 07:32:55 -0700</bug_when>
    <thetext>According to the spec[1][2], `Set#symmetricDifference` and `Set#union` get
    keys iterator&apos;s `next` method via `GetIteratorFromMethod`[3] and
    `GetIteratorDirect`[4] before cloning `this`.
    
    However, the current JSC implementation don&apos;t get it. Getting `next` method
    can occur observable side effects, so we need to fix it.
    
    [1]: https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
    [2]: https://tc39.es/ecma262/#sec-set.prototype.union
    [3]: https://tc39.es/ecma262/#sec-getiteratorfrommethod
    [4]: https://tc39.es/ecma262/#sec-getiteratordirect</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2101743</commentid>
    <comment_count>1</comment_count>
    <who name="Sosuke Suzuki">sosuke</who>
    <bug_when>2025-03-09 07:34:13 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/42158</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2101816</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-03-09 20:16:40 -0700</bug_when>
    <thetext>Committed 291875@main (b07e269b5a00): &lt;https://commits.webkit.org/291875@main&gt;

Reviewed commits have been landed. Closing PR #42158 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2101817</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-03-09 20:17:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/146627064&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>