diff options
-rw-r--r-- | Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp index be2a42b48..cdadc9c45 100644 --- a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp +++ b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp @@ -113,9 +113,10 @@ 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) +#if COMPILER(GCC) && !COMPILER(CLANG) + Function<void()> functionCopy = function; dispatch_source_set_event_handler(source, ^{ - function(); + functionCopy(); }); #else dispatch_source_set_event_handler(source, function); @@ -296,7 +297,7 @@ 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) +#if COMPILER(GCC) && !COMPILER(CLANG) dispatch_source_set_event_handler(m_deadNameSource, ^{ connectionDidClose(); }); |