Diff
Modified: trunk/Source/WebKit2/ChangeLog (179345 => 179346)
--- trunk/Source/WebKit2/ChangeLog 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/ChangeLog 2015-01-29 18:23:45 UTC (rev 179346)
@@ -1,3 +1,33 @@
+2015-01-29 Csaba Osztrogonác <[email protected]>
+
+ [EFL][GTK] Fix the build after r179326
+ https://bugs.webkit.org/show_bug.cgi?id=141027
+
+ Reviewed by Alexey Proskuryakov.
+
+ Guard MessageRecorder implementation with USE(DTRACE)
+ for platforms not supporting DTrace.
+
+ Original patch by Carlos Garcia Campos <[email protected]>
+
+ * Platform/IPC/ArgumentCoders.cpp:
+ * Platform/IPC/ArgumentCoders.h:
+ * Platform/IPC/Connection.cpp:
+ (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
+ (IPC::Connection::sendMessage):
+ (IPC::Connection::sendSyncMessage):
+ (IPC::Connection::sendSyncMessageFromSecondaryThread):
+ (IPC::Connection::dispatchSyncMessage):
+ (IPC::Connection::dispatchMessage):
+ * Platform/IPC/MessageDecoder.cpp:
+ (IPC::MessageDecoder::MessageDecoder):
+ * Platform/IPC/MessageDecoder.h:
+ * Platform/IPC/MessageEncoder.cpp:
+ (IPC::MessageEncoder::MessageEncoder):
+ (IPC::MessageEncoder::encodeHeader):
+ * Platform/IPC/MessageEncoder.h:
+ * Platform/IPC/MessageRecorder.h:
+
2015-01-29 Tim Horton <[email protected]>
Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
Modified: trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp 2015-01-29 18:23:45 UTC (rev 179346)
@@ -162,6 +162,7 @@
return decodeStringText<UChar>(decoder, length, result);
}
+#if HAVE(DTRACE)
void ArgumentCoder<uuid_t>::encode(ArgumentEncoder& encoder, const uuid_t& uuid)
{
SimpleArgumentCoder<uuid_t>::encode(encoder, uuid);
@@ -171,5 +172,6 @@
{
return SimpleArgumentCoder<uuid_t>::decode(decoder, uuid);
}
+#endif
} // namespace IPC
Modified: trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h 2015-01-29 18:23:45 UTC (rev 179346)
@@ -29,13 +29,16 @@
#include "ArgumentDecoder.h"
#include "ArgumentEncoder.h"
#include <utility>
-#include <uuid/uuid.h>
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/Optional.h>
#include <wtf/Vector.h>
+#if HAVE(DTRACE)
+#include <uuid/uuid.h>
+#endif
+
namespace IPC {
// An argument coder works on POD types
@@ -299,10 +302,12 @@
static bool decode(ArgumentDecoder&, String&);
};
+#if HAVE(DTRACE)
template<> struct ArgumentCoder<uuid_t> {
static void encode(ArgumentEncoder&, const uuid_t&);
static bool decode(ArgumentDecoder&, uuid_t&);
};
+#endif
} // namespace IPC
Modified: trunk/Source/WebKit2/Platform/IPC/Connection.cpp (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/Connection.cpp 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.cpp 2015-01-29 18:23:45 UTC (rev 179346)
@@ -317,7 +317,11 @@
return;
}
+#if HAVE(DTRACE)
auto replyEncoder = std::make_unique<MessageEncoder>("IPC", "SyncMessageReply", syncRequestID, incomingMessageDecoder->UUID());
+#else
+ auto replyEncoder = std::make_unique<MessageEncoder>("IPC", "SyncMessageReply", syncRequestID);
+#endif
// Hand off both the decoder and encoder to the work queue message receiver.
workQueueMessageReceiver->didReceiveSyncMessage(*this, *decoder, replyEncoder);
@@ -379,9 +383,11 @@
|| m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount))
encoder->setShouldDispatchMessageWhenWaitingForSyncReply(true);
+#if HAVE(DTRACE)
std::unique_ptr<MessageRecorder::MessageProcessingToken> token;
if (!alreadyRecordedMessage)
token = MessageRecorder::recordOutgoingMessage(*this, *encoder);
+#endif
{
std::lock_guard<std::mutex> lock(m_outgoingMessagesMutex);
@@ -477,7 +483,9 @@
++m_inSendSyncCount;
+#if HAVE(DTRACE)
auto token = MessageRecorder::recordOutgoingMessage(*this, *encoder);
+#endif
// First send the message.
sendMessage(WTF::move(encoder), DispatchMessageEvenWhenWaitingForSyncReply, true);
@@ -521,7 +529,9 @@
m_secondaryThreadPendingSyncReplyMap.add(syncRequestID, &pendingReply);
}
+#if HAVE(DTRACE)
auto token = MessageRecorder::recordOutgoingMessage(*this, *encoder);
+#endif
sendMessage(WTF::move(encoder), 0, true);
@@ -776,7 +786,11 @@
return;
}
+#if HAVE(DTRACE)
auto replyEncoder = std::make_unique<MessageEncoder>("IPC", "SyncMessageReply", syncRequestID, decoder.UUID());
+#else
+ auto replyEncoder = std::make_unique<MessageEncoder>("IPC", "SyncMessageReply", syncRequestID);
+#endif
// Hand off both the decoder and encoder to the client.
m_client->didReceiveSyncMessage(*this, decoder, replyEncoder);
@@ -823,7 +837,9 @@
void Connection::dispatchMessage(std::unique_ptr<MessageDecoder> message)
{
+#if HAVE(DTRACE)
MessageRecorder::recordIncomingMessage(*this, *message);
+#endif
if (!m_client)
return;
Modified: trunk/Source/WebKit2/Platform/IPC/MessageDecoder.cpp (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/MessageDecoder.cpp 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/MessageDecoder.cpp 2015-01-29 18:23:45 UTC (rev 179346)
@@ -55,8 +55,9 @@
if (!decode(m_destinationID))
return;
-
+#if HAVE(DTRACE)
decode(m_UUID);
+#endif
}
bool MessageDecoder::isSyncMessage() const
Modified: trunk/Source/WebKit2/Platform/IPC/MessageDecoder.h (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/MessageDecoder.h 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/MessageDecoder.h 2015-01-29 18:23:45 UTC (rev 179346)
@@ -29,7 +29,10 @@
#include "ArgumentDecoder.h"
#include "MessageRecorder.h"
#include "StringReference.h"
+
+#if HAVE(DTRACE)
#include <uuid/uuid.h>
+#endif
namespace IPC {
@@ -52,9 +55,11 @@
void setImportanceAssertion(std::unique_ptr<ImportanceAssertion>);
#endif
+#if HAVE(DTRACE)
void setMessageProcessingToken(std::unique_ptr<MessageRecorder::MessageProcessingToken> token) { m_processingToken = WTF::move(token); }
const uuid_t& UUID() const { return m_UUID; }
+#endif
private:
uint8_t m_messageFlags;
@@ -63,13 +68,14 @@
uint64_t m_destinationID;
+#if HAVE(DTRACE)
uuid_t m_UUID;
+ std::unique_ptr<MessageRecorder::MessageProcessingToken> m_processingToken;
+#endif
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
std::unique_ptr<ImportanceAssertion> m_importanceAssertion;
#endif
-
- std::unique_ptr<MessageRecorder::MessageProcessingToken> m_processingToken;
};
} // namespace IPC
Modified: trunk/Source/WebKit2/Platform/IPC/MessageEncoder.cpp (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/MessageEncoder.cpp 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/MessageEncoder.cpp 2015-01-29 18:23:45 UTC (rev 179346)
@@ -35,6 +35,7 @@
static uint8_t defaultMessageFlags = 0;
+#if HAVE(DTRACE)
MessageEncoder::MessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, const uuid_t& UUID)
: m_messageReceiverName(messageReceiverName)
, m_messageName(messageName)
@@ -43,13 +44,16 @@
uuid_copy(m_UUID, UUID);
encodeHeader();
}
+#endif
MessageEncoder::MessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID)
: m_messageReceiverName(messageReceiverName)
, m_messageName(messageName)
, m_destinationID(destinationID)
{
+#if HAVE(DTRACE)
uuid_generate(m_UUID);
+#endif
encodeHeader();
}
@@ -65,7 +69,9 @@
*this << m_messageReceiverName;
*this << m_messageName;
*this << m_destinationID;
+#if HAVE(DTRACE)
*this << m_UUID;
+#endif
}
bool MessageEncoder::isSyncMessage() const
Modified: trunk/Source/WebKit2/Platform/IPC/MessageEncoder.h (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/MessageEncoder.h 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/MessageEncoder.h 2015-01-29 18:23:45 UTC (rev 179346)
@@ -28,9 +28,12 @@
#include "ArgumentEncoder.h"
#include "StringReference.h"
-#include <uuid/uuid.h>
#include <wtf/Forward.h>
+#if HAVE(DTRACE)
+#include <uuid/uuid.h>
+#endif
+
namespace IPC {
class StringReference;
@@ -38,7 +41,9 @@
class MessageEncoder : public ArgumentEncoder {
public:
MessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID);
+#if HAVE(DTRACE)
MessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, const uuid_t&);
+#endif
virtual ~MessageEncoder();
StringReference messageReceiverName() const { return m_messageReceiverName; }
@@ -51,7 +56,9 @@
void setShouldDispatchMessageWhenWaitingForSyncReply(bool);
bool shouldDispatchMessageWhenWaitingForSyncReply() const;
+#if HAVE(DTRACE)
const uuid_t& UUID() const { return m_UUID; }
+#endif
private:
void encodeHeader();
@@ -59,7 +66,9 @@
StringReference m_messageReceiverName;
StringReference m_messageName;
uint64_t m_destinationID;
+#if HAVE(DTRACE)
uuid_t m_UUID;
+#endif
};
} // namespace IPC
Modified: trunk/Source/WebKit2/Platform/IPC/MessageRecorder.h (179345 => 179346)
--- trunk/Source/WebKit2/Platform/IPC/MessageRecorder.h 2015-01-29 16:58:15 UTC (rev 179345)
+++ trunk/Source/WebKit2/Platform/IPC/MessageRecorder.h 2015-01-29 18:23:45 UTC (rev 179346)
@@ -26,6 +26,8 @@
#ifndef MessageRecorder_h
#define MessageRecorder_h
+#if HAVE(DTRACE)
+
#include "ProcessType.h"
#include <uuid/uuid.h>
#include <wtf/Forward.h>
@@ -84,4 +86,6 @@
};
+#endif // HAVE(DTRACE)
+
#endif // MessageRecorder_h