<?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>257580</bug_id>
          
          <creation_ts>2023-05-31 19:13:34 -0700</creation_ts>
          <short_desc>Make MachSendRight move-only</short_desc>
          <delta_ts>2023-07-26 13:52:37 -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>WebKit2</component>
          <version>WebKit Nightly 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>
          <dependson>257581</dependson>
    
    <dependson>258608</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Woodrow">mattwoodrow</reporter>
          <assigned_to name="Matt Woodrow">mattwoodrow</assigned_to>
          <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1959222</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2023-05-31 19:13:34 -0700</bug_when>
    <thetext>MachSendRight are expensive to copy, since it calls into the kernel. We generally don&apos;t want to do that by accident.

We should make MachSendRight move-only, and switch callers to use the existing &apos;copySendRight&apos; function where they do want a duplicate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959273</commentid>
    <comment_count>1</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-05-31 23:21:30 -0700</bug_when>
    <thetext>This extends to all the handle types that should unify their interface:
UnixFileDescriptor
Win32Handle
MachSendRight

If the copy constructor should be removed, the interface should be the same for all so that generic code can be written.
E.g. 
  ...::copy() or ...::duplicate()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1960473</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-06-07 17:29:28 -0700</bug_when>
    <thetext>&lt;rdar://problem/110431180&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1960474</commentid>
    <comment_count>3</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2023-06-07 17:32:39 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/14771</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963961</commentid>
    <comment_count>4</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-06-27 23:45:09 -0700</bug_when>
    <thetext>maybe bug 258608 needs to be addressed before landing the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968303</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-07-26 13:52:35 -0700</bug_when>
    <thetext>Committed 266327@main (aeb697fb2c06): &lt;https://commits.webkit.org/266327@main&gt;

Reviewed commits have been landed. Closing PR #14771 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>