Title: [250713] trunk/Source/WebKit
- Revision
- 250713
- Author
- carlo...@webkit.org
- Date
- 2019-10-04 02:42:56 -0700 (Fri, 04 Oct 2019)
Log Message
[GTK][WPE] REGRESSION(r250673): connection to network process is broken after r250673
https://bugs.webkit.org/show_bug.cgi?id=202575
Reviewed by Carlos Alberto Lopez Perez.
The file descriptor is now closed when the IPC::Attachment is destroyed in NetworkProcessConnectionInfo
destructor. In case of unix domain sockets we need to transfer the ownership of the fd to
NetworkProcessConnection, but NetworkProcessConnectionInfo is ow keeping the ownership.
* WebProcess/Network/NetworkProcessConnectionInfo.h:
(WebKit::NetworkProcessConnectionInfo::releaseIdentifier): Use IPC::Attachment::releaseFileDescriptor() in case
of unix domain sockets.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureNetworkProcessConnection): Use NetworkProcessConnectionInfo::releaseIdentifier() when
passing the identifier to NetworkProcessConnection.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (250712 => 250713)
--- trunk/Source/WebKit/ChangeLog 2019-10-04 08:33:05 UTC (rev 250712)
+++ trunk/Source/WebKit/ChangeLog 2019-10-04 09:42:56 UTC (rev 250713)
@@ -1,5 +1,23 @@
2019-10-04 Carlos Garcia Campos <cgar...@igalia.com>
+ [GTK][WPE] REGRESSION(r250673): connection to network process is broken after r250673
+ https://bugs.webkit.org/show_bug.cgi?id=202575
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ The file descriptor is now closed when the IPC::Attachment is destroyed in NetworkProcessConnectionInfo
+ destructor. In case of unix domain sockets we need to transfer the ownership of the fd to
+ NetworkProcessConnection, but NetworkProcessConnectionInfo is ow keeping the ownership.
+
+ * WebProcess/Network/NetworkProcessConnectionInfo.h:
+ (WebKit::NetworkProcessConnectionInfo::releaseIdentifier): Use IPC::Attachment::releaseFileDescriptor() in case
+ of unix domain sockets.
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::ensureNetworkProcessConnection): Use NetworkProcessConnectionInfo::releaseIdentifier() when
+ passing the identifier to NetworkProcessConnection.
+
+2019-10-04 Carlos Garcia Campos <cgar...@igalia.com>
+
Unreviewed. Fix GTK distcheck
* webkitglib-symbols.map: Remove symbols that are no longer in lib.
Modified: trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnectionInfo.h (250712 => 250713)
--- trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnectionInfo.h 2019-10-04 08:33:05 UTC (rev 250712)
+++ trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnectionInfo.h 2019-10-04 09:42:56 UTC (rev 250713)
@@ -46,7 +46,18 @@
return IPC::Connection::Identifier();
#endif
}
-
+
+ IPC::Connection::Identifier releaseIdentifier()
+ {
+#if USE(UNIX_DOMAIN_SOCKETS)
+ auto returnValue = IPC::Connection::Identifier(connection.releaseFileDescriptor());
+#else
+ auto returnValue = identifier();
+#endif
+ connection = { };
+ return returnValue;
+ }
+
void encode(IPC::Encoder& encoder) const
{
encoder << connection;
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (250712 => 250713)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-10-04 08:33:05 UTC (rev 250712)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-10-04 09:42:56 UTC (rev 250713)
@@ -1174,7 +1174,7 @@
if (!IPC::Connection::identifierIsValid(connectionInfo.identifier()))
CRASH();
- m_networkProcessConnection = NetworkProcessConnection::create(connectionInfo.identifier());
+ m_networkProcessConnection = NetworkProcessConnection::create(connectionInfo.releaseIdentifier());
#if HAVE(AUDIT_TOKEN)
m_networkProcessConnection->setNetworkProcessAuditToken(WTFMove(connectionInfo.auditToken));
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes