Commit 07455fa6 authored by kbalazs@webkit.org's avatar kbalazs@webkit.org

2011-04-07 Balazs Kelemen <kbalazs@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
        https://bugs.webkit.org/show_bug.cgi?id=58030

        * wtf/Platform.h: Introduce USE(UNIX_DOMAIN_SOCKETS) for WebKit2.
2011-04-07  Balazs Kelemen  <kbalazs@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
        https://bugs.webkit.org/show_bug.cgi?id=58030

        Replace "PLATFORM(QT) || PLATFORM(GTK)" conditions in IPC code with
        USE(UNIX_DOMAIN_SOCKETS).

        * Platform/CoreIPC/Attachment.h:
        * Platform/CoreIPC/Connection.h:
        * Platform/SharedMemory.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1b582bcf
2011-04-07 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
https://bugs.webkit.org/show_bug.cgi?id=58030
* wtf/Platform.h: Introduce USE(UNIX_DOMAIN_SOCKETS) for WebKit2.
2011-04-08 Adam Roben <aroben@apple.com>
Clean build fix
......
......@@ -1196,4 +1196,8 @@
breakages one port at a time. */
#define WTF_USE_EXPORT_MACROS 0
#if PLATFORM(QT) || PLATFORM(GTK)
#define WTF_USE_UNIX_DOMAIN_SOCKETS 1
#endif
#endif /* WTF_Platform_h */
2011-04-07 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
https://bugs.webkit.org/show_bug.cgi?id=58030
Replace "PLATFORM(QT) || PLATFORM(GTK)" conditions in IPC code with
USE(UNIX_DOMAIN_SOCKETS).
* Platform/CoreIPC/Attachment.h:
* Platform/CoreIPC/Connection.h:
* Platform/SharedMemory.h:
2011-04-07 Anders Carlsson <andersca@apple.com>
Reviewed by Simon Fraser.
......
......@@ -39,8 +39,8 @@ public:
Uninitialized,
#if PLATFORM(MAC)
MachPortType,
MachOOLMemoryType
#elif PLATFORM(QT) || PLATFORM(GTK)
MachOOLMemoryType,
#elif USE(UNIX_DOMAIN_SOCKETS)
MappedMemory
#endif
};
......@@ -48,7 +48,7 @@ public:
#if PLATFORM(MAC)
Attachment(mach_port_name_t port, mach_msg_type_name_t disposition);
Attachment(void* address, mach_msg_size_t size, mach_msg_copy_options_t copyOptions, bool deallocate);
#elif PLATFORM(QT) || PLATFORM(GTK)
#elif USE(UNIX_DOMAIN_SOCKETS)
Attachment(int fileDescriptor, size_t);
#endif
......@@ -66,7 +66,7 @@ public:
mach_msg_size_t size() const { ASSERT(m_type == MachOOLMemoryType); return m_oolMemory.size; }
mach_msg_copy_options_t copyOptions() const { ASSERT(m_type == MachOOLMemoryType); return m_oolMemory.copyOptions; }
bool deallocate() const { ASSERT(m_type == MachOOLMemoryType); return m_oolMemory.deallocate; }
#elif PLATFORM(QT) || PLATFORM(GTK)
#elif USE(UNIX_DOMAIN_SOCKETS)
size_t size() const { return m_size; }
int releaseFileDescriptor() { int temp = m_fileDescriptor; m_fileDescriptor = -1; return temp; }
......@@ -94,7 +94,7 @@ private:
bool deallocate;
} m_oolMemory;
};
#elif PLATFORM(QT) || PLATFORM(GTK)
#elif USE(UNIX_DOMAIN_SOCKETS)
int m_fileDescriptor;
size_t m_size;
#endif
......
......@@ -101,9 +101,7 @@ public:
#elif PLATFORM(WIN)
typedef HANDLE Identifier;
static bool createServerAndClientIdentifiers(Identifier& serverIdentifier, Identifier& clientIdentifier);
#elif PLATFORM(QT)
typedef int Identifier;
#elif PLATFORM(GTK)
#elif USE(UNIX_DOMAIN_SOCKETS)
typedef int Identifier;
#endif
......@@ -308,7 +306,7 @@ private:
OwnPtr<ArgumentEncoder> m_pendingWriteArguments;
OVERLAPPED m_writeState;
HANDLE m_connectionPipe;
#elif PLATFORM(QT) || PLATFORM(GTK)
#elif USE(UNIX_DOMAIN_SOCKETS)
// Called on the connection queue.
void readyReadHandler();
......
......@@ -60,7 +60,7 @@ public:
void encode(CoreIPC::ArgumentEncoder*) const;
static bool decode(CoreIPC::ArgumentDecoder*, Handle&);
#if PLATFORM(QT) || PLATFORM(GTK)
#if USE(UNIX_DOMAIN_SOCKETS)
CoreIPC::Attachment releaseToAttachment() const;
void adoptFromAttachment(int fileDescriptor, size_t);
#endif
......@@ -70,7 +70,7 @@ public:
mutable mach_port_t m_port;
#elif PLATFORM(WIN)
mutable HANDLE m_handle;
#elif PLATFORM(QT) || PLATFORM(GTK)
#elif USE(UNIX_DOMAIN_SOCKETS)
mutable int m_fileDescriptor;
#endif
size_t m_size;
......@@ -103,7 +103,7 @@ private:
mach_port_t m_port;
#elif PLATFORM(WIN)
HANDLE m_handle;
#elif PLATFORM(QT) || PLATFORM(GTK)
#elif USE(UNIX_DOMAIN_SOCKETS)
int m_fileDescriptor;
#endif
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment