<?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>280237</bug_id>
          
          <creation_ts>2024-09-23 17:04:56 -0700</creation_ts>
          <short_desc>Use UnixFileDescriptor in IPC and ProcessLauncher</short_desc>
          <delta_ts>2024-12-19 06:04:43 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=280073</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Diego Pino">dpino</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>dpino</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2062549</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-09-23 17:04:56 -0700</bug_when>
    <thetext>Using UnixFileDescriptor wherever possible make it harder to accidentally leak file descriptors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062564</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-09-23 17:31:45 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/34133</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2082642</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-12-18 04:44:48 -0800</bug_when>
    <thetext>Committed 288001@main (0b420fd88a45): &lt;https://commits.webkit.org/288001@main&gt;

Reviewed commits have been landed. Closing PR #34133 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2082955</commentid>
    <comment_count>3</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-12-19 01:45:57 -0800</bug_when>
    <thetext>I got the following build errror when building WPE using JHBuild:

```
[8099/8175] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir///DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-28.cpp.o
FAILED: Source/WebKit/CMakeFiles/WebKit.dir///DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-28.cpp.o
/usr/bin/ccache /usr/bin/clang++-18 -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBUILDING_WPE__=1 -DBUILDING_WebKit -DDATADIR=\&quot;/usr/local/share\&quot; -DGETTEXT_PACKAGE=\&quot;WPE\&quot; -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DLIBDIR=\&quot;/usr/local/lib\&quot; -DLOCALEDIR=\&quot;/usr/local/share/l
In file included from /home/pwuser/webkit/WebKitBuild/WPE/Release/DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-28.cpp:3:
/home/pwuser/webkit/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:117:95: error: no viable conversion from &apos;typename remove_reference&lt;UnixFileDescriptor &amp;&gt;::type&apos; (aka &apos;WTF::UnixFileDescriptor&apos;) to &apos;int&apos;
  117 |         m_processID = ProcessProviderLibWPE::singleton().launchProcess(m_launchOptions, argv, WTFMove(webkitSocketPair.client));
	  |                                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pwuser/webkit/WebKitBuild/WPE/Release/WTF/Headers/wtf/StdLibExtras.h:1189:24: note: expanded from macro &apos;WTFMove&apos;
 1189 | #define WTFMove(value) std::move&lt;WTF::CheckMoveParameter&gt;(value)
	  |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pwuser/webkit/Source/WebKit/UIProcess/Launcher/libwpe/ProcessProviderLibWPE.h:46:85: note: passing argument to parameter &apos;childProcessSocket&apos; here
   46 |     ProcessID launchProcess(const ProcessLauncher::LaunchOptions&amp;, char** argv, int childProcessSocket);
	  |                                                                                     ^
In file included from /home/pwuser/webkit/WebKitBuild/WPE/Release/DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-28.cpp:3:
/home/pwuser/webkit/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:123:52: error: no matching constructor for initialization of &apos;IPC::Connection::Identifier&apos;
  123 |             didFinishLaunchingProcess(m_processID, IPC::Connection::Identifier { WTFMove(serverSocket) });
	  |                                                    ^                           ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pwuser/webkit/Source/WebKit/Platform/IPC/Connection.h:251:30: note: candidate constructor not viable: no known conversion from &apos;typename remove_reference&lt;const UnixFileDescriptor &amp;&gt;::type&apos; (aka &apos;const WTF::UnixFileDescriptor&apos;) to &apos;const Identifier&apos; for 1st argument
  251 |         WTF_MAKE_NONCOPYABLE(Identifier);
	  |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/pwuser/webkit/WebKitBuild/WPE/Release/WTF/Headers/wtf/Noncopyable.h:24:5: note: expanded from macro &apos;WTF_MAKE_NONCOPYABLE&apos;
   24 |     ClassName(const ClassName&amp;) = delete; \
	  |     ^         ~~~~~~~~~~~~~~~~
/home/pwuser/webkit/Source/WebKit/Platform/IPC/Connection.h:254:9: note: candidate constructor not viable: no known conversion from &apos;typename remove_reference&lt;const UnixFileDescriptor &amp;&gt;::type&apos; (aka &apos;const WTF::UnixFileDescriptor&apos;) to &apos;Identifier&apos; for 1st argument
  254 |         Identifier(Identifier&amp;&amp;) = default;
	  |         ^          ~~~~~~~~~~~~
/home/pwuser/webkit/Source/WebKit/Platform/IPC/Connection.h:258:18: note: candidate constructor not viable: no known conversion from &apos;typename remove_reference&lt;const UnixFileDescriptor &amp;&gt;::type&apos; (aka &apos;const WTF::UnixFileDescriptor&apos;) to &apos;Handle&apos; (aka &apos;IPC::ConnectionHandle&apos;)
  258 |         explicit Identifier(Handle&amp;&amp; handle)
	  |                  ^          ~~~~~~~~~~~~~~~
/home/pwuser/webkit/Source/WebKit/Platform/IPC/Connection.h:262:18: note: candidate constructor not viable: 1st argument (&apos;typename remove_reference&lt;const UnixFileDescriptor &amp;&gt;::type&apos; (aka &apos;const WTF::UnixFileDescriptor&apos;)) would lose const qualifier
  262 |         explicit Identifier(UnixFileDescriptor&amp;&amp; fd)
	  |                  ^          ~~~~~~~~~~~~~~~~~~~~~~~
/home/pwuser/webkit/Source/WebKit/Platform/IPC/Connection.h:253:9: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
  253 |         Identifier() = default;
	  |         ^
2 errors generated.
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2082956</commentid>
    <comment_count>4</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-12-19 01:47:50 -0800</bug_when>
    <thetext>Re-opening for pull request https://github.com/webkit/webkit/pull/38198</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2082957</commentid>
    <comment_count>5</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-12-19 02:20:57 -0800</bug_when>
    <thetext>The &apos;WPE-Linux-64bit-Release-Packaging-Nightly&apos; bot is failing for the same reason. The build error occurs when BUBBLEWRAP_SANDBOX is disabled. The &apos;WPE-Linux-64bit-Release-Packaging-Nightly&apos; bot builds with `bubblewrap-sandbox` disabled:

```
perl Tools/Scripts/build-webkit --no-fatal-warnings --release --no-bubblewrap-sandbox --wpe
```

https://build.webkit.org/#/builders/1322/builds/68/steps/10/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2082985</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-12-19 06:04:40 -0800</bug_when>
    <thetext>Committed 288083@main (a7d65dca86e3): &lt;https://commits.webkit.org/288083@main&gt;

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

    </bug>

</bugzilla>