Diff
Modified: trunk/Source/WTF/ChangeLog (191855 => 191856)
--- trunk/Source/WTF/ChangeLog 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WTF/ChangeLog 2015-11-01 14:23:21 UTC (rev 191856)
@@ -1,3 +1,15 @@
+2015-11-01 Philip Chimento <philip.chime...@gmail.com>
+
+ [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
+ https://bugs.webkit.org/show_bug.cgi?id=144560
+
+ Reviewed by Darin Adler.
+
+ * wtf/Platform.h: Don't USE(ACCELERATE) on PLATFORM(GTK).
+ * wtf/WorkQueue.h: Change order of OS(DARWIN) and PLATFORM(GTK)
+ checks so that GTK facilities are used even when building the
+ GTK platform on Darwin.
+
2015-11-01 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Use RunLoop::Timer in main thread shared timer GTK+ implementation
Modified: trunk/Source/WTF/wtf/Platform.h (191855 => 191856)
--- trunk/Source/WTF/wtf/Platform.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WTF/wtf/Platform.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -634,8 +634,10 @@
#define HAVE_PTHREAD_SETNAME_NP 1
#define HAVE_READLINE 1
#define HAVE_SYS_TIMEB_H 1
+
+#if !PLATFORM(GTK)
#define USE_ACCELERATE 1
-
+#endif
#if !PLATFORM(IOS)
#define HAVE_HOSTED_CORE_ANIMATION 1
#endif
Modified: trunk/Source/WTF/wtf/WorkQueue.h (191855 => 191856)
--- trunk/Source/WTF/wtf/WorkQueue.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WTF/wtf/WorkQueue.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -34,7 +34,7 @@
#include <wtf/RefCounted.h>
#include <wtf/Threading.h>
-#if OS(DARWIN)
+#if OS(DARWIN) && !PLATFORM(GTK)
#include <dispatch/dispatch.h>
#endif
@@ -73,13 +73,13 @@
WTF_EXPORT_PRIVATE static void concurrentApply(size_t iterations, const std::function<void (size_t index)>&);
-#if OS(DARWIN)
- dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
GMainContext* mainContext() const { return m_eventContext.get(); }
#elif PLATFORM(EFL)
void registerSocketEventHandler(int, std::function<void ()>);
void unregisterSocketEventHandler(int);
+#elif OS(DARWIN)
+ dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
#endif
private:
@@ -101,15 +101,15 @@
static DWORD WINAPI unregisterWaitAndDestroyItemCallback(void* context);
#endif
-#if OS(DARWIN)
- static void executeFunction(void*);
- dispatch_queue_t m_dispatchQueue;
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
ThreadIdentifier m_workQueueThread;
GRefPtr<GMainContext> m_eventContext;
GRefPtr<GMainLoop> m_eventLoop;
#elif PLATFORM(EFL)
RefPtr<DispatchQueue> m_dispatchQueue;
+#elif OS(DARWIN)
+ static void executeFunction(void*);
+ dispatch_queue_t m_dispatchQueue;
#elif OS(WINDOWS)
volatile LONG m_isWorkThreadRegistered;
Modified: trunk/Source/WebCore/ChangeLog (191855 => 191856)
--- trunk/Source/WebCore/ChangeLog 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebCore/ChangeLog 2015-11-01 14:23:21 UTC (rev 191856)
@@ -1,3 +1,19 @@
+2015-11-01 Philip Chimento <philip.chime...@gmail.com>
+
+ [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
+ https://bugs.webkit.org/show_bug.cgi?id=144560
+
+ Reviewed by Darin Adler.
+
+ * platform/graphics/PlatformDisplay.cpp: Only include the
+ X11-specific GDK header on PLATFORM(X11). In other cases the
+ normal gdk.h header is needed, which would otherwise be pulled in
+ by gdkx.h.
+ * platform/graphics/opentype/OpenTypeMathData.cpp: Change check
+ for FourCharCode type from OS(DARWIN) to PLATFORM(COCOA). We
+ can't remove it altogether because OT_MAKE_TAG doesn't work for
+ all platforms.
+
2015-11-01 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Use RunLoop::Timer in main thread shared timer GTK+ implementation
Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp (191855 => 191856)
--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -42,13 +42,16 @@
#endif
#if PLATFORM(GTK)
-#if PLATFORM(X11)
+#include <gdk/gdk.h>
+#endif
+
+#if PLATFORM(GTK) && PLATFORM(X11)
#include <gdk/gdkx.h>
#endif
-#if PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2)
+
+#if PLATFORM(GTK) && PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2)
#include <gdk/gdkwayland.h>
#endif
-#endif // PLATFORM(GTK)
#if PLATFORM(EFL) && defined(HAVE_ECORE_X)
#include <Ecore_X.h>
Modified: trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp (191855 => 191856)
--- trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -40,7 +40,7 @@
#if ENABLE(OPENTYPE_MATH)
namespace OpenType {
-#if OS(DARWIN)
+#if PLATFORM(COCOA)
const FourCharCode MATHTag = 'MATH';
#else
const uint32_t MATHTag = OT_MAKE_TAG('M', 'A', 'T', 'H');
Modified: trunk/Source/WebKit2/ChangeLog (191855 => 191856)
--- trunk/Source/WebKit2/ChangeLog 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/ChangeLog 2015-11-01 14:23:21 UTC (rev 191856)
@@ -1,3 +1,60 @@
+2015-11-01 Philip Chimento <philip.chime...@gmail.com>
+
+ [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
+ https://bugs.webkit.org/show_bug.cgi?id=144560
+
+ Reviewed by Darin Adler.
+
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
+ Change order of OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) checks,
+ so that we can use Unix domain sockets even on Darwin for the GTK
+ platform.
+ * Platform/IPC/Attachment.cpp: Add USE(UNIX_DOMAIN_SOCKETS) check
+ to OS(DARWIN) check, in order to support GTK platform on OSX.
+ * Platform/IPC/Attachment.h: Change order of OS(DARWIN) and
+ USE(UNIX_DOMAIN_SOCKETS) checks throughout.
+ (IPC::Attachment::size):
+ (IPC::Attachment::releaseFileDescriptor):
+ (IPC::Attachment::fileDescriptor):
+ (IPC::Attachment::disposition):
+ (IPC::Attachment::port):
+ * Platform/IPC/Connection.h: Ditto.
+ (IPC::Connection::identifierIsNull):
+ (IPC::Connection::Identifier::Identifier):
+ (IPC::Connection::xpcConnection):
+ * Platform/IPC/unix/ConnectionUnix.cpp: Only use SOCK_SEQPACKET
+ if the platform is not GTK, because otherwise the PLATFORM(GTK)
+ check below is never reached.
+ * Platform/SharedMemory.h: Change order of OS(DARWIN) and
+ USE(UNIX_DOMAIN_SOCKETS) checks.
+ * PluginProcess/PluginProcess.cpp: Ditto.
+ (WebKit::PluginProcess::createWebProcessConnection):
+ * Shared/API/c/WKBase.h: Don't include WKBaseMac.h if building
+ GTK.
+ * UIProcess/API/C/WKNativeEvent.h: Don't use Apple API if
+ building GTK.
+ * UIProcess/Launcher/ProcessLauncher.cpp: Change to
+ OS(DARWIN) && !PLATFORM(GTK), in the absence of a better platform
+ macro such as USE(MACH).
+ (WebKit::ProcessLauncher::didFinishLaunchingProcess):
+ * UIProcess/Launcher/ProcessLauncher.h: Ditto.
+ * UIProcess/Network/NetworkProcessProxy.cpp: Change order of
+ OS(DARWIN) and PLATFORM(GTK) checks.
+ (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
+ (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
+ * UIProcess/Plugins/PluginProcessProxy.cpp: Ditto.
+ (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
+ (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
+ * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Ditto.
+ (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
+ * WebProcess/WebPage/WebInspector.cpp: Ditto.
+ (WebKit::WebInspector::createInspectorPage):
+ * WebProcess/WebPage/WebInspectorUI.cpp: Ditto.
+ (WebKit::WebInspectorUI::establishConnection):
+ * WebProcess/WebProcess.cpp: Ditto.
+ (WebKit::WebProcess::ensureNetworkProcessConnection):
+
2015-11-01 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Use RunLoop::Timer in PluginInfoCache
Modified: trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp (191855 => 191856)
--- trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -184,7 +184,11 @@
void DatabaseProcess::createDatabaseToWebProcessConnection()
{
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
+ m_databaseToWebProcessConnections.append(DatabaseToWebProcessConnection::create(socketPair.server));
+ parentProcessConnection()->send(Messages::DatabaseProcessProxy::DidCreateDatabaseToWebProcessConnection(IPC::Attachment(socketPair.client)), 0);
+#elif OS(DARWIN)
// Create the listening port.
mach_port_t listeningPort;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
@@ -195,10 +199,6 @@
IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
parentProcessConnection()->send(Messages::DatabaseProcessProxy::DidCreateDatabaseToWebProcessConnection(clientPort), 0);
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
- m_databaseToWebProcessConnections.append(DatabaseToWebProcessConnection::create(socketPair.server));
- parentProcessConnection()->send(Messages::DatabaseProcessProxy::DidCreateDatabaseToWebProcessConnection(IPC::Attachment(socketPair.client)), 0);
#else
notImplemented();
#endif
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (191855 => 191856)
--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -233,7 +233,15 @@
void NetworkProcess::createNetworkConnectionToWebProcess()
{
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
+
+ RefPtr<NetworkConnectionToWebProcess> connection = NetworkConnectionToWebProcess::create(socketPair.server);
+ m_webProcessConnections.append(connection.release());
+
+ IPC::Attachment clientSocket(socketPair.client);
+ parentProcessConnection()->send(Messages::NetworkProcessProxy::DidCreateNetworkConnectionToWebProcess(clientSocket), 0);
+#elif OS(DARWIN)
// Create the listening port.
mach_port_t listeningPort;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
@@ -244,14 +252,6 @@
IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
parentProcessConnection()->send(Messages::NetworkProcessProxy::DidCreateNetworkConnectionToWebProcess(clientPort), 0);
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
-
- RefPtr<NetworkConnectionToWebProcess> connection = NetworkConnectionToWebProcess::create(socketPair.server);
- m_webProcessConnections.append(connection.release());
-
- IPC::Attachment clientSocket(socketPair.client);
- parentProcessConnection()->send(Messages::NetworkProcessProxy::DidCreateNetworkConnectionToWebProcess(clientSocket), 0);
#else
notImplemented();
#endif
Modified: trunk/Source/WebKit2/Platform/IPC/Attachment.cpp (191855 => 191856)
--- trunk/Source/WebKit2/Platform/IPC/Attachment.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/Platform/IPC/Attachment.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -36,7 +36,7 @@
{
}
-#if OS(DARWIN)
+#if OS(DARWIN) && !USE(UNIX_DOMAIN_SOCKETS)
Attachment::Attachment(mach_port_name_t port, mach_msg_type_name_t disposition)
: m_type(MachPortType)
, m_port(port)
Modified: trunk/Source/WebKit2/Platform/IPC/Attachment.h (191855 => 191856)
--- trunk/Source/WebKit2/Platform/IPC/Attachment.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/Platform/IPC/Attachment.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -26,7 +26,7 @@
#ifndef Attachment_h
#define Attachment_h
-#if OS(DARWIN)
+#if OS(DARWIN) && !USE(UNIX_DOMAIN_SOCKETS)
#include <mach/mach_init.h>
#include <mach/mach_traps.h>
#endif
@@ -42,38 +42,37 @@
enum Type {
Uninitialized,
-#if OS(DARWIN)
- MachPortType,
-#elif USE(UNIX_DOMAIN_SOCKETS)
+#if USE(UNIX_DOMAIN_SOCKETS)
SocketType,
- MappedMemoryType
+ MappedMemoryType,
+#elif OS(DARWIN)
+ MachPortType
#endif
};
-#if OS(DARWIN)
- Attachment(mach_port_name_t port, mach_msg_type_name_t disposition);
-#elif USE(UNIX_DOMAIN_SOCKETS)
+#if USE(UNIX_DOMAIN_SOCKETS)
Attachment(Attachment&&);
Attachment& operator=(Attachment&&);
Attachment(int fileDescriptor, size_t);
Attachment(int fileDescriptor);
~Attachment();
+#elif OS(DARWIN)
+ Attachment(mach_port_name_t, mach_msg_type_name_t disposition);
#endif
Type type() const { return m_type; }
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ size_t size() const { return m_size; }
+
+ int releaseFileDescriptor() { int temp = m_fileDescriptor; m_fileDescriptor = -1; return temp; }
+ int fileDescriptor() const { return m_fileDescriptor; }
+#elif OS(DARWIN)
void release();
// MachPortType
mach_port_name_t port() const { return m_port; }
mach_msg_type_name_t disposition() const { return m_disposition; }
-
-#elif USE(UNIX_DOMAIN_SOCKETS)
- size_t size() const { return m_size; }
-
- int releaseFileDescriptor() { int temp = m_fileDescriptor; m_fileDescriptor = -1; return temp; }
- int fileDescriptor() const { return m_fileDescriptor; }
#endif
void encode(ArgumentEncoder&) const;
@@ -82,12 +81,12 @@
private:
Type m_type;
-#if OS(DARWIN)
- mach_port_name_t m_port;
- mach_msg_type_name_t m_disposition;
-#elif USE(UNIX_DOMAIN_SOCKETS)
+#if USE(UNIX_DOMAIN_SOCKETS)
int m_fileDescriptor { -1 };
size_t m_size;
+#elif OS(DARWIN)
+ mach_port_name_t m_port;
+ mach_msg_type_name_t m_disposition;
#endif
};
Modified: trunk/Source/WebKit2/Platform/IPC/Connection.h (191855 => 191856)
--- trunk/Source/WebKit2/Platform/IPC/Connection.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -42,7 +42,7 @@
#include <wtf/WorkQueue.h>
#include <wtf/text/CString.h>
-#if OS(DARWIN)
+#if OS(DARWIN) && !USE(UNIX_DOMAIN_SOCKETS)
#include <mach/mach_port.h>
#include <wtf/OSObjectPtr.h>
#include <wtf/spi/darwin/XPCSPI.h>
@@ -104,7 +104,22 @@
class WorkQueueMessageReceiver : public MessageReceiver, public ThreadSafeRefCounted<WorkQueueMessageReceiver> {
};
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ typedef int Identifier;
+ static bool identifierIsNull(Identifier identifier) { return identifier == -1; }
+
+ struct SocketPair {
+ int client;
+ int server;
+ };
+
+ enum ConnectionOptions {
+ SetCloexecOnClient = 1 << 0,
+ SetCloexecOnServer = 1 << 1,
+ };
+
+ static Connection::SocketPair createPlatformConnection(unsigned options = SetCloexecOnClient | SetCloexecOnServer);
+#elif OS(DARWIN)
struct Identifier {
Identifier()
: port(MACH_PORT_NULL)
@@ -129,21 +144,6 @@
xpc_connection_t xpcConnection() const { return m_xpcConnection.get(); }
bool getAuditToken(audit_token_t&);
pid_t remoteProcessID() const;
-#elif USE(UNIX_DOMAIN_SOCKETS)
- typedef int Identifier;
- static bool identifierIsNull(Identifier identifier) { return identifier == -1; }
-
- struct SocketPair {
- int client;
- int server;
- };
-
- enum ConnectionOptions {
- SetCloexecOnClient = 1 << 0,
- SetCloexecOnServer = 1 << 1,
- };
-
- static Connection::SocketPair createPlatformConnection(unsigned options = SetCloexecOnClient | SetCloexecOnServer);
#endif
static Ref<Connection> createServerConnection(Identifier, Client&);
@@ -326,8 +326,21 @@
bool m_shouldBoostMainThreadOnSyncMessage { false };
#endif
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
// Called on the connection queue.
+ void readyReadHandler();
+ bool processMessage();
+
+ Vector<uint8_t> m_readBuffer;
+ size_t m_readBufferSize;
+ Vector<int> m_fileDescriptors;
+ size_t m_fileDescriptorsSize;
+ int m_socketDescriptor;
+#if PLATFORM(GTK)
+ GMainLoopSource m_socketEventSource;
+#endif
+#elif OS(DARWIN)
+ // Called on the connection queue.
void receiveSourceEventHandler();
void initializeDeadNameSource();
@@ -347,21 +360,7 @@
#endif
OSObjectPtr<xpc_connection_t> m_xpcConnection;
-
-#elif USE(UNIX_DOMAIN_SOCKETS)
- // Called on the connection queue.
- void readyReadHandler();
- bool processMessage();
-
- Vector<uint8_t> m_readBuffer;
- size_t m_readBufferSize;
- Vector<int> m_fileDescriptors;
- size_t m_fileDescriptorsSize;
- int m_socketDescriptor;
-#if PLATFORM(GTK)
- GMainLoopSource m_socketEventSource;
#endif
-#endif
};
template<typename T> bool Connection::send(T&& message, uint64_t destinationID, unsigned messageSendFlags)
Modified: trunk/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp (191855 => 191856)
--- trunk/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -43,7 +43,7 @@
#include <gio/gio.h>
#endif
-#ifdef SOCK_SEQPACKET
+#if defined(SOCK_SEQPACKET) && !PLATFORM(GTK)
#define SOCKET_TYPE SOCK_SEQPACKET
#else
#if PLATFORM(GTK)
Modified: trunk/Source/WebKit2/Platform/SharedMemory.h (191855 => 191856)
--- trunk/Source/WebKit2/Platform/SharedMemory.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/Platform/SharedMemory.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -74,11 +74,11 @@
#endif
private:
friend class SharedMemory;
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ mutable IPC::Attachment m_attachment;
+#elif OS(DARWIN)
mutable mach_port_t m_port;
size_t m_size;
-#elif USE(UNIX_DOMAIN_SOCKETS)
- mutable IPC::Attachment m_attachment;
#endif
};
@@ -112,11 +112,11 @@
void* m_data;
Protection m_protection;
-#if OS(DARWIN)
- mach_port_t m_port;
-#elif USE(UNIX_DOMAIN_SOCKETS)
+#if USE(UNIX_DOMAIN_SOCKETS)
int m_fileDescriptor;
bool m_isWrappingMap { false };
+#elif OS(DARWIN)
+ mach_port_t m_port;
#endif
};
Modified: trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp (191855 => 191856)
--- trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -148,7 +148,15 @@
{
bool didHaveAnyWebProcessConnections = !m_webProcessConnections.isEmpty();
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
+
+ RefPtr<WebProcessConnection> connection = WebProcessConnection::create(socketPair.server);
+ m_webProcessConnections.append(connection.release());
+
+ IPC::Attachment clientSocket(socketPair.client);
+ parentProcessConnection()->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientSocket, m_supportsAsynchronousPluginInitialization), 0);
+#elif OS(DARWIN)
// Create the listening port.
mach_port_t listeningPort;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
@@ -167,14 +175,6 @@
IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
parentProcessConnection()->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientPort, m_supportsAsynchronousPluginInitialization), 0);
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
-
- RefPtr<WebProcessConnection> connection = WebProcessConnection::create(socketPair.server);
- m_webProcessConnections.append(connection.release());
-
- IPC::Attachment clientSocket(socketPair.client);
- parentProcessConnection()->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientSocket, m_supportsAsynchronousPluginInitialization), 0);
#else
notImplemented();
#endif
Modified: trunk/Source/WebKit2/Shared/API/c/WKBase.h (191855 => 191856)
--- trunk/Source/WebKit2/Shared/API/c/WKBase.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/Shared/API/c/WKBase.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -42,7 +42,7 @@
#include <WebKit/WKBaseEfl.h>
#endif
-#if defined(__APPLE__)
+#if defined(__APPLE__) && !defined(BUILDING_GTK__)
#include <WebKit/WKBaseMac.h>
#endif
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h (191855 => 191856)
--- trunk/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -34,7 +34,7 @@
extern "C" {
#endif
-#if defined(__APPLE__) && !TARGET_OS_IPHONE
+#if defined(__APPLE__) && !TARGET_OS_IPHONE && !defined(BUILDING_GTK__)
#ifdef __OBJC__
@class NSEvent;
#elif __cplusplus
Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp (191855 => 191856)
--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -134,10 +134,10 @@
while (!m_pendingConnectionReplies.isEmpty()) {
auto reply = m_pendingConnectionReplies.takeFirst();
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ reply->send(IPC::Attachment());
+#elif OS(DARWIN)
reply->send(IPC::Attachment(0, MACH_MSG_TYPE_MOVE_SEND));
-#elif USE(UNIX_DOMAIN_SOCKETS)
- reply->send(IPC::Attachment());
#else
notImplemented();
#endif
@@ -169,10 +169,10 @@
RefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst();
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ reply->send(connectionIdentifier);
+#elif OS(DARWIN)
reply->send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND));
-#elif USE(UNIX_DOMAIN_SOCKETS)
- reply->send(connectionIdentifier);
#else
notImplemented();
#endif
Modified: trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp (191855 => 191856)
--- trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -58,7 +58,8 @@
if (!m_client) {
// FIXME: Make Identifier a move-only object and release port rights/connections in the destructor.
-#if OS(DARWIN)
+#if OS(DARWIN) && !PLATFORM(GTK)
+ // FIXME: Should really be something like USE(MACH)
if (identifier.port)
mach_port_mod_refs(mach_task_self(), identifier.port, MACH_PORT_RIGHT_RECEIVE, -1);
#endif
Modified: trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h (191855 => 191856)
--- trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h 2015-11-01 14:23:21 UTC (rev 191856)
@@ -61,7 +61,7 @@
struct LaunchOptions {
ProcessType processType;
HashMap<String, String> extraInitializationData;
-#if OS(DARWIN)
+#if OS(DARWIN) && !PLATFORM(GTK)
static const cpu_type_t MatchCurrentArchitecture = 0;
cpu_type_t architecture;
bool executableHeap;
Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (191855 => 191856)
--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -170,10 +170,10 @@
while (!m_pendingConnectionReplies.isEmpty()) {
RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst();
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ reply->send(IPC::Attachment());
+#elif OS(DARWIN)
reply->send(IPC::Attachment(0, MACH_MSG_TYPE_MOVE_SEND));
-#elif USE(UNIX_DOMAIN_SOCKETS)
- reply->send(IPC::Attachment());
#else
notImplemented();
#endif
@@ -236,10 +236,10 @@
// Grab the first pending connection reply.
RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst();
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ reply->send(connectionIdentifier);
+#elif OS(DARWIN)
reply->send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND));
-#elif USE(UNIX_DOMAIN_SOCKETS)
- reply->send(connectionIdentifier);
#else
notImplemented();
#endif
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp (191855 => 191856)
--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -155,10 +155,10 @@
while (!m_pendingConnectionReplies.isEmpty()) {
RefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst();
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ reply->send(IPC::Attachment(), false);
+#elif OS(DARWIN)
reply->send(IPC::Attachment(0, MACH_MSG_TYPE_MOVE_SEND), false);
-#elif USE(UNIX_DOMAIN_SOCKETS)
- reply->send(IPC::Attachment(), false);
#else
notImplemented();
#endif
@@ -269,10 +269,10 @@
// Grab the first pending connection reply.
RefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst();
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ reply->send(connectionIdentifier, supportsAsynchronousPluginInitialization);
+#elif OS(DARWIN)
reply->send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND), supportsAsynchronousPluginInitialization);
-#elif USE(UNIX_DOMAIN_SOCKETS)
- reply->send(connectionIdentifier, supportsAsynchronousPluginInitialization);
#else
notImplemented();
#endif
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp (191855 => 191856)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -36,7 +36,7 @@
#include "WebProcess.h"
#include "WebProcessProxyMessages.h"
-#if OS(DARWIN)
+#if OS(DARWIN) && !USE(UNIX_DOMAIN_SOCKETS)
#include "MachPort.h"
#endif
@@ -74,10 +74,10 @@
Messages::WebProcessProxy::GetPluginProcessConnection::Reply(encodedConnectionIdentifier, supportsAsynchronousInitialization), 0))
return 0;
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
+#elif OS(DARWIN)
IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port());
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
#endif
if (IPC::Connection::identifierIsNull(connectionIdentifier))
return nullptr;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp (191855 => 191856)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -72,16 +72,16 @@
// Called from WebInspectorClient
void WebInspector::openFrontendConnection(bool underTest)
{
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
+ IPC::Connection::Identifier connectionIdentifier(socketPair.server);
+ IPC::Attachment connectionClientPort(socketPair.client);
+#elif OS(DARWIN)
mach_port_t listeningPort;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
IPC::Connection::Identifier connectionIdentifier(listeningPort);
IPC::Attachment connectionClientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
- IPC::Connection::Identifier connectionIdentifier(socketPair.server);
- IPC::Attachment connectionClientPort(socketPair.client);
#else
notImplemented();
return;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp (191855 => 191856)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -54,10 +54,10 @@
void WebInspectorUI::establishConnection(IPC::Attachment encodedConnectionIdentifier, uint64_t inspectedPageIdentifier, bool underTest)
{
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.releaseFileDescriptor());
+#elif OS(DARWIN)
IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port());
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.releaseFileDescriptor());
#else
notImplemented();
return;
Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (191855 => 191856)
--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2015-11-01 14:23:21 UTC (rev 191856)
@@ -409,10 +409,10 @@
Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0))
return;
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
+#elif OS(DARWIN)
IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port());
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
#else
ASSERT_NOT_REACHED();
#endif
@@ -1092,10 +1092,10 @@
Messages::WebProcessProxy::GetDatabaseProcessConnection::Reply(encodedConnectionIdentifier), 0))
return;
-#if OS(DARWIN)
+#if USE(UNIX_DOMAIN_SOCKETS)
+ IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
+#elif OS(DARWIN)
IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port());
-#elif USE(UNIX_DOMAIN_SOCKETS)
- IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
#else
ASSERT_NOT_REACHED();
#endif
Modified: trunk/Source/bmalloc/ChangeLog (191855 => 191856)
--- trunk/Source/bmalloc/ChangeLog 2015-11-01 08:33:38 UTC (rev 191855)
+++ trunk/Source/bmalloc/ChangeLog 2015-11-01 14:23:21 UTC (rev 191856)
@@ -1,3 +1,15 @@
+2015-11-01 Philip Chimento <philip.chime...@gmail.com>
+
+ [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
+ https://bugs.webkit.org/show_bug.cgi?id=144560
+
+ Reviewed by Darin Adler.
+
+ * PlatformGTK.cmake: Added. This adds Zone.cpp to the PlatformGTK
+ build, on Darwin only. Since there was previously nothing for the
+ build system to do that was specific to the GTK platform in
+ bmalloc, we need to create this file.
+
2015-10-29 Geoffrey Garen <gga...@apple.com>
bmalloc: AsyncTask should handle destruction
Added: trunk/Source/bmalloc/PlatformGTK.cmake (0 => 191856)
--- trunk/Source/bmalloc/PlatformGTK.cmake (rev 0)
+++ trunk/Source/bmalloc/PlatformGTK.cmake 2015-11-01 14:23:21 UTC (rev 191856)
@@ -0,0 +1,5 @@
+if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ list(APPEND bmalloc_SOURCES
+ bmalloc/Zone.cpp
+ )
+endif ()