summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/WTF/wtf/Platform.h5
-rw-r--r--Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp12
-rw-r--r--Source/WebKit2/Platform/mac/SharedMemoryMac.cpp5
3 files changed, 22 insertions, 0 deletions
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 37dd12f97..d61c20383 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -728,6 +728,11 @@
#define ENABLE_DISASSEMBLER 1
#endif
+/* Disable the LLINT on versions of GCC prior to 4.3. Mainly due to buggy assembler on OSX 10.6, the only supported platform using that old a version. */
+#if !defined(ENABLE_LLINT) && COMPILER(GCC) && !GCC_VERSION_AT_LEAST(4, 3, 0)
+#define ENABLE_LLINT 0
+#endif
+
/* On some of the platforms where we have a JIT, we want to also have the
low-level interpreter. */
#if !defined(ENABLE_LLINT) \
diff --git a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
index 2ceac7706..be2a42b48 100644
--- a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
@@ -113,7 +113,13 @@ void Connection::platformInitialize(Identifier identifier)
static dispatch_source_t createDataAvailableSource(mach_port_t receivePort, WorkQueue* workQueue, const Function<void()>& function)
{
dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, receivePort, 0, workQueue->dispatchQueue());
+#if COMPILER(GCC)
+ dispatch_source_set_event_handler(source, ^{
+ function();
+ });
+#else
dispatch_source_set_event_handler(source, function);
+#endif
dispatch_source_set_cancel_handler(source, ^{
mach_port_mod_refs(mach_task_self(), receivePort, MACH_PORT_RIGHT_RECEIVE, -1);
});
@@ -290,7 +296,13 @@ bool Connection::sendOutgoingMessage(PassOwnPtr<MessageEncoder> encoder)
void Connection::initializeDeadNameSource()
{
m_deadNameSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_SEND, m_sendPort, 0, m_connectionQueue->dispatchQueue());
+#if COMPILER(GCC)
+ dispatch_source_set_event_handler(m_deadNameSource, ^{
+ connectionDidClose();
+ });
+#else
dispatch_source_set_event_handler(m_deadNameSource, bind(&Connection::connectionDidClose, this));
+#endif
mach_port_t sendPort = m_sendPort;
dispatch_source_set_cancel_handler(m_deadNameSource, ^{
diff --git a/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp b/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp
index c7b52d910..b581b353a 100644
--- a/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp
+++ b/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp
@@ -36,6 +36,11 @@
#include <mach/vm_map.h>
#include <wtf/RefPtr.h>
+// Define this when building on older versions of Mac OS X.
+#ifndef VM_PROT_IS_MASK
+#define VM_PROT_IS_MASK ((vm_prot_t) 0x40)
+#endif
+
namespace WebKit {
SharedMemory::Handle::Handle()