Title: [213576] trunk/Source/WebKit2
- Revision
- 213576
- Author
- [email protected]
- Date
- 2017-03-08 09:44:23 -0800 (Wed, 08 Mar 2017)
Log Message
[WK2] Guard GLib-specific code in Module, Connection files with USE(GLIB)
https://bugs.webkit.org/show_bug.cgi?id=169349
Reviewed by Carlos Garcia Campos.
Use the USE(GLIB) build guards for GLib-specific code in Connection and
Module header files and the ConnectionUnix implementation file, instead
of the PLATFORM(GTK) guard.
* Platform/IPC/Connection.h:
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::platformInitialize):
(IPC::Connection::platformInvalidate):
(IPC::Connection::open):
(IPC::Connection::sendOutputMessage):
* Platform/Module.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (213575 => 213576)
--- trunk/Source/WebKit2/ChangeLog 2017-03-08 17:43:30 UTC (rev 213575)
+++ trunk/Source/WebKit2/ChangeLog 2017-03-08 17:44:23 UTC (rev 213576)
@@ -1,3 +1,22 @@
+2017-03-08 Zan Dobersek <[email protected]>
+
+ [WK2] Guard GLib-specific code in Module, Connection files with USE(GLIB)
+ https://bugs.webkit.org/show_bug.cgi?id=169349
+
+ Reviewed by Carlos Garcia Campos.
+
+ Use the USE(GLIB) build guards for GLib-specific code in Connection and
+ Module header files and the ConnectionUnix implementation file, instead
+ of the PLATFORM(GTK) guard.
+
+ * Platform/IPC/Connection.h:
+ * Platform/IPC/unix/ConnectionUnix.cpp:
+ (IPC::Connection::platformInitialize):
+ (IPC::Connection::platformInvalidate):
+ (IPC::Connection::open):
+ (IPC::Connection::sendOutputMessage):
+ * Platform/Module.h:
+
2017-03-08 Tim Horton <[email protected]>
Remove unused WebPageIOS::zoomToRect and plumbing
Modified: trunk/Source/WebKit2/Platform/IPC/Connection.h (213575 => 213576)
--- trunk/Source/WebKit2/Platform/IPC/Connection.h 2017-03-08 17:43:30 UTC (rev 213575)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.h 2017-03-08 17:44:23 UTC (rev 213576)
@@ -47,7 +47,7 @@
#include <wtf/spi/darwin/XPCSPI.h>
#endif
-#if PLATFORM(GTK)
+#if USE(GLIB)
#include "GSocketMonitor.h"
#endif
@@ -315,7 +315,7 @@
Vector<int> m_fileDescriptors;
int m_socketDescriptor;
std::unique_ptr<UnixMessage> m_pendingOutputMessage;
-#if PLATFORM(GTK)
+#if USE(GLIB)
GRefPtr<GSocket> m_socket;
GSocketMonitor m_readSocketMonitor;
GSocketMonitor m_writeSocketMonitor;
Modified: trunk/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp (213575 => 213576)
--- trunk/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp 2017-03-08 17:43:30 UTC (rev 213575)
+++ trunk/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp 2017-03-08 17:44:23 UTC (rev 213576)
@@ -40,7 +40,7 @@
#include <wtf/StdLibExtras.h>
#include <wtf/UniStdExtras.h>
-#if PLATFORM(GTK)
+#if USE(GLIB)
#include <gio/gio.h>
#endif
@@ -49,7 +49,7 @@
#if defined(SOCK_SEQPACKET) && !OS(DARWIN)
#define SOCKET_TYPE SOCK_SEQPACKET
#else
-#if PLATFORM(GTK)
+#if USE(GLIB)
#define SOCKET_TYPE SOCK_STREAM
#else
#define SOCKET_TYPE SOCK_DGRAM
@@ -93,7 +93,7 @@
void Connection::platformInitialize(Identifier identifier)
{
m_socketDescriptor = identifier;
-#if PLATFORM(GTK)
+#if USE(GLIB)
m_socket = adoptGRef(g_socket_new_from_fd(m_socketDescriptor, nullptr));
#endif
m_readBuffer.reserveInitialCapacity(messageMaxSize);
@@ -102,8 +102,8 @@
void Connection::platformInvalidate()
{
-#if PLATFORM(GTK)
- // In GTK+ platform the socket descriptor is owned by GSocket.
+#if USE(GLIB)
+ // In the GLib platform the socket descriptor is owned by GSocket.
m_socket = nullptr;
#else
if (m_socketDescriptor != -1)
@@ -113,7 +113,7 @@
if (!m_isConnected)
return;
-#if PLATFORM(GTK)
+#if USE(GLIB)
m_readSocketMonitor.stop();
m_writeSocketMonitor.stop();
#endif
@@ -331,7 +331,7 @@
RefPtr<Connection> protectedThis(this);
m_isConnected = true;
-#if PLATFORM(GTK)
+#if USE(GLIB)
m_readSocketMonitor.start(m_socket.get(), G_IO_IN, m_connectionQueue->runLoop(), [protectedThis] (GIOCondition condition) -> gboolean {
if (condition & G_IO_HUP || condition & G_IO_ERR || condition & G_IO_NVAL) {
protectedThis->connectionDidClose();
@@ -474,7 +474,7 @@
if (errno == EINTR)
continue;
if (errno == EAGAIN || errno == EWOULDBLOCK) {
-#if PLATFORM(GTK)
+#if USE(GLIB)
m_pendingOutputMessage = std::make_unique<UnixMessage>(WTFMove(outputMessage));
m_writeSocketMonitor.start(m_socket.get(), G_IO_OUT, m_connectionQueue->runLoop(), [this, protectedThis = makeRef(*this)] (GIOCondition condition) -> gboolean {
if (condition & G_IO_OUT) {
Modified: trunk/Source/WebKit2/Platform/Module.h (213575 => 213576)
--- trunk/Source/WebKit2/Platform/Module.h 2017-03-08 17:43:30 UTC (rev 213575)
+++ trunk/Source/WebKit2/Platform/Module.h 2017-03-08 17:44:23 UTC (rev 213576)
@@ -33,7 +33,7 @@
#include <wtf/RetainPtr.h>
#endif
-#if PLATFORM(GTK)
+#if USE(GLIB)
typedef struct _GModule GModule;
#endif
@@ -69,7 +69,7 @@
#if !defined(__LP64__)
CFBundleRefNum m_bundleResourceMap;
#endif
-#elif PLATFORM(GTK)
+#elif USE(GLIB)
GModule* m_handle;
#endif
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes