Diff
Modified: trunk/Source/WTF/ChangeLog (282114 => 282115)
--- trunk/Source/WTF/ChangeLog 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WTF/ChangeLog 2021-09-07 23:32:28 UTC (rev 282115)
@@ -1,3 +1,61 @@
+2021-09-07 Cameron McCormack <[email protected]>
+
+ Add an IPCMessages channel to log all IPC messages
+ https://bugs.webkit.org/show_bug.cgi?id=229664
+ <rdar://problem/82511640>
+
+ Reviewed by Alex Christensen.
+
+ Two changes to TextStream in this patch.
+
+ The first is a new argument to the constructor to allow limiting
+ the number of elements in a container when appending it to a
+ TextStream. This is intended to be used when the output is for
+ human consumption and could potentially be uselessly large.
+
+ The second is a value adapter ValueOrEllipsis. This allows appending
+ a value to a TextStream even if it doesn't have an
+ operator<<(TextStream&) defined. If it doesn't, then the fallback
+ value "..." is used instead.
+
+ An implementation detail of ValueOrEllipsis is a new type trait
+ supports_text_stream_insertion, which detects at compile time whether
+ a given type can be appended to a TextStream. It works by using
+ "_expression_ SFINAE" and partial template specialization.
+
+ The base, unspecialized version of the template inherits from
+ std::false_type, and is selected for all types by default.
+
+ A partial specialization that uses decltype() to check whether a
+ `TextStream() << value` _expression_ would compile inherits from
+ std::true_type.
+
+ Sadly, C++ SFINAE has a limitation that means template definitions
+ that would be instantiated inside the decltype() are not checked
+ to ensure they would compile. This would mean container types whose
+ elements are types that don't have an operator<< defined would still
+ report true from supports_text_stream_insertion. We work around this
+ by having more specific partial specializations for all of the container
+ types we have operator<< definitions for, which defer to the
+ supports_text_stream_insertion value for the element type(s).
+
+ If an operator<< is added for a new container type without a
+ corresponding supports_text_stream_insertion specialization, and that
+ type is used with ValueOrEllipsis, it will cause a compile error.
+
+ The supports_text_stream_insertion template takes six template
+ arguments, which looks odd, but is needed because all specializations
+ must have the same number (and kind) of template arguments. The six
+ include five type template arguments (which is how many HashMap has)
+ plus a size_t value template argument (for Vector's inlineCapacity
+ argument).
+
+ * wtf/text/TextStream.h:
+ (WTF::TextStream::TextStream):
+ (WTF::TextStream::containerSizeLimit const):
+ (WTF::operator<<):
+ (WTF::ValueOrEllipsis::ValueOrEllipsis):
+
2021-09-07 Chris Dumez <[email protected]>
Implement origin partitioning (top-origin/frame-origin) for BroadcastChannel
Modified: trunk/Source/WTF/wtf/text/TextStream.h (282114 => 282115)
--- trunk/Source/WTF/wtf/text/TextStream.h 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WTF/wtf/text/TextStream.h 2021-09-07 23:32:28 UTC (rev 282115)
@@ -53,9 +53,10 @@
};
enum class LineMode { SingleLine, MultipleLine };
- TextStream(LineMode lineMode = LineMode::MultipleLine, OptionSet<Formatting> formattingFlags = { })
+ TextStream(LineMode lineMode = LineMode::MultipleLine, OptionSet<Formatting> formattingFlags = { }, unsigned containerSizeLimit = 0)
: m_formattingFlags(formattingFlags)
, m_multiLineMode(lineMode == LineMode::MultipleLine)
+ , m_containerSizeLimit(containerSizeLimit)
{
}
@@ -112,6 +113,8 @@
WTF_EXPORT_PRIVATE void writeIndent();
+ unsigned containerSizeLimit() const { return m_containerSizeLimit; }
+
// Stream manipulators.
TextStream& operator<<(TextStream& (*func)(TextStream&))
{
@@ -174,6 +177,7 @@
int m_indent { 0 };
OptionSet<Formatting> m_formattingFlags;
bool m_multiLineMode { true };
+ unsigned m_containerSizeLimit { 0 };
};
inline TextStream& indent(TextStream& ts)
@@ -223,13 +227,18 @@
{
ts << "[";
- unsigned size = vector.size();
- for (unsigned i = 0; i < size; ++i) {
- ts << vector[i];
- if (i < size - 1)
+ unsigned count = 0;
+ for (const auto& value : vector) {
+ if (count)
ts << ", ";
+ ts << value;
+ if (++count == ts.containerSizeLimit())
+ break;
}
+ if (count != vector.size())
+ ts << ", ...";
+
return ts << "]";
}
@@ -262,14 +271,18 @@
{
ts << "{";
- bool first = true;
+ unsigned count = 0;
for (const auto& keyValuePair : map) {
+ if (count)
+ ts << ", ";
ts << keyValuePair.key << ": " << keyValuePair.value;
- if (!first)
- ts << ", ";
- first = false;
+ if (++count == ts.containerSizeLimit())
+ break;
}
+ if (count != map.size())
+ ts << ", ...";
+
return ts << "}";
}
@@ -278,14 +291,18 @@
{
ts << "[";
- bool first = true;
+ unsigned count = 0;
for (const auto& item : set) {
+ if (count)
+ ts << ", ";
ts << item;
- if (!first)
- ts << ", ";
- first = false;
+ if (++count == ts.containerSizeLimit())
+ break;
}
+ if (count != set.size())
+ ts << ", ...";
+
return ts << "]";
}
@@ -303,6 +320,57 @@
return ts << "]";
}
+template<typename, typename = void, typename = void, typename = void, typename = void, size_t = 0>
+struct supports_text_stream_insertion : std::false_type { };
+
+template<typename T>
+struct supports_text_stream_insertion<T, std::void_t<decltype(std::declval<TextStream&>() << std::declval<T>())>> : std::true_type { };
+
+template<typename ItemType, size_t inlineCapacity>
+struct supports_text_stream_insertion<Vector<ItemType, inlineCapacity>> : supports_text_stream_insertion<ItemType> { };
+
+template<typename ValueArg, typename HashArg, typename TraitsArg>
+struct supports_text_stream_insertion<HashSet<ValueArg, HashArg, TraitsArg>> : supports_text_stream_insertion<ValueArg> { };
+
+template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg>
+struct supports_text_stream_insertion<HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>> : std::conjunction<supports_text_stream_insertion<KeyArg>, supports_text_stream_insertion<MappedArg>> { };
+
+template<typename T, typename Traits>
+struct supports_text_stream_insertion<Markable<T, Traits>> : supports_text_stream_insertion<T> { };
+
+template<typename T>
+struct supports_text_stream_insertion<OptionSet<T>> : supports_text_stream_insertion<T> { };
+
+template<typename T>
+struct supports_text_stream_insertion<std::optional<T>> : supports_text_stream_insertion<T> { };
+
+template<typename T>
+struct supports_text_stream_insertion<WeakPtr<T>> : supports_text_stream_insertion<T> { };
+
+template<typename T>
+struct supports_text_stream_insertion<RefPtr<T>> : supports_text_stream_insertion<T> { };
+
+template<typename T>
+struct supports_text_stream_insertion<Ref<T>> : supports_text_stream_insertion<T> { };
+
+template<typename T>
+struct ValueOrEllipsis {
+ explicit ValueOrEllipsis(const T& value)
+ : value(value)
+ { }
+ const T& value;
+};
+
+template<typename T>
+TextStream& operator<<(TextStream& ts, ValueOrEllipsis<T> item)
+{
+ if constexpr (supports_text_stream_insertion<T>::value)
+ ts << item.value;
+ else
+ ts << "...";
+ return ts;
+}
+
// Deprecated. Use TextStream::writeIndent() instead.
WTF_EXPORT_PRIVATE void writeIndent(TextStream&, int indent);
@@ -309,5 +377,6 @@
} // namespace WTF
using WTF::TextStream;
+using WTF::ValueOrEllipsis;
using WTF::ValueOrNull;
using WTF::indent;
Modified: trunk/Source/WebCore/ChangeLog (282114 => 282115)
--- trunk/Source/WebCore/ChangeLog 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebCore/ChangeLog 2021-09-07 23:32:28 UTC (rev 282115)
@@ -1,3 +1,19 @@
+2021-09-07 Cameron McCormack <[email protected]>
+
+ Add an IPCMessages channel to log all IPC messages
+ https://bugs.webkit.org/show_bug.cgi?id=229664
+ <rdar://problem/82511640>
+
+ Reviewed by Alex Christensen.
+
+ Add a way to get the type of process we're in as a string, for
+ logging.
+
+ * platform/RuntimeApplicationChecks.cpp:
+ (WebCore::processType):
+ (WebCore::processTypeDescription):
+ * platform/RuntimeApplicationChecks.h:
+
2021-09-07 Chris Dumez <[email protected]>
Implement origin partitioning (top-origin/frame-origin) for BroadcastChannel
Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp (282114 => 282115)
--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -83,4 +83,33 @@
return *currentType == type;
}
+std::optional<AuxiliaryProcessType> processType()
+{
+ return auxiliaryProcessType();
+}
+
+const char* processTypeDescription(std::optional<AuxiliaryProcessType> type)
+{
+ if (!type)
+ return "UI";
+
+ switch (*type) {
+ case AuxiliaryProcessType::WebContent:
+ return "Web";
+ case AuxiliaryProcessType::Network:
+ return "Network";
+ case AuxiliaryProcessType::Plugin:
+ return "Plugin";
+#if ENABLE(GPU_PROCESS)
+ case AuxiliaryProcessType::GPU:
+ return "GPU";
+#endif
+#if ENABLE(WEB_AUTHN)
+ case AuxiliaryProcessType::WebAuthn:
+ return "WebAuthn";
+#endif
+ }
+ return "Unknown";
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (282114 => 282115)
--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2021-09-07 23:32:28 UTC (rev 282115)
@@ -25,6 +25,7 @@
#pragma once
+#include <optional>
#include <wtf/Forward.h>
namespace WebCore {
@@ -46,6 +47,8 @@
WEBCORE_EXPORT void setAuxiliaryProcessType(AuxiliaryProcessType);
WEBCORE_EXPORT bool checkAuxiliaryProcessType(AuxiliaryProcessType);
+WEBCORE_EXPORT std::optional<AuxiliaryProcessType> processType();
+WEBCORE_EXPORT const char* processTypeDescription(std::optional<AuxiliaryProcessType>);
bool isInAuxiliaryProcess();
inline bool isInWebProcess() { return checkAuxiliaryProcessType(AuxiliaryProcessType::WebContent); }
Modified: trunk/Source/WebKit/ChangeLog (282114 => 282115)
--- trunk/Source/WebKit/ChangeLog 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/ChangeLog 2021-09-07 23:32:28 UTC (rev 282115)
@@ -1,3 +1,76 @@
+2021-09-07 Cameron McCormack <[email protected]>
+
+ Add an IPCMessages channel to log all IPC messages
+ https://bugs.webkit.org/show_bug.cgi?id=229664
+ <rdar://problem/82511640>
+
+ Reviewed by Alex Christensen.
+
+ This adds a new IPCMessages log channel, to which all IPC message names,
+ arguments, and return values are logged. To avoid performance impacts
+ when not logging, these are only enabled in debug builds.
+
+ ValueOrDefault is used when writing out each message argument to (1)
+ avoid having to add operator<<(TextStream&) defintions for all
+ argument types right now, and (2) to alleviate the need to add such a
+ definition when adding new IPC messages. The string "..." is output
+ for types with no operator<< defined.
+
+ The remote and local process IDs are included in the log message. The
+ remote process ID is only readily accessible on OS(DARWIN), as we can
+ grab it from the XPC connection. But not all IPC::Connections are
+ created for XPC connections. For example, the Web -> GPU process
+ connection is created by the UI process on behalf of the Web process,
+ and the IPC::Connection::Identifier does not have an XPC service
+ handle in it. So for now, we omit the remote process ID. (We'd need
+ to thread it through messages like CreateGPUConnectionToWebProcess
+ to have it available.)
+
+ Since we need the IPC::Connection object for logging now, all of the
+ handleMessage* functions take a connection, and the messages.py code
+ generator is updated accordingly.
+
+ * Platform/IPC/HandleMessage.h:
+ (IPC::textStreamForLogging):
+ (IPC::logMessageImpl):
+ (IPC::logMessage):
+ (IPC::logReply):
+ (IPC::handleMessage):
+ (IPC::handleMessageWantsConnection):
+ (IPC::handleMessageSynchronous):
+ (IPC::handleMessageSynchronousWantsConnection):
+ (IPC::handleMessageAsync):
+ (IPC::handleMessageAsyncWantsConnection):
+ * Platform/Logging.h:
+ * Scripts/webkit/messages.py:
+ (async_message_statement):
+ (sync_message_statement):
+ * Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp:
+ (WebKit::TestWithCVPixelBuffer::didReceiveMessage):
+ (WebKit::TestWithCVPixelBuffer::didReceiveSyncMessage):
+ * Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:
+ (WebKit::TestWithIfMessage::didReceiveMessage):
+ * Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:
+ (WebKit::TestWithImageData::didReceiveMessage):
+ (WebKit::TestWithImageData::didReceiveSyncMessage):
+ * Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:
+ (WebKit::TestWithLegacyReceiver::didReceiveTestWithLegacyReceiverMessage):
+ (WebKit::TestWithLegacyReceiver::didReceiveSyncTestWithLegacyReceiverMessage):
+ * Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:
+ (WebKit::TestWithSemaphore::didReceiveMessage):
+ (WebKit::TestWithSemaphore::didReceiveSyncMessage):
+ * Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:
+ (WebKit::TestWithStreamBuffer::didReceiveMessage):
+ * Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:
+ (WebKit::TestWithStream::didReceiveStreamMessage):
+ * Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:
+ (WebKit::TestWithSuperclass::didReceiveMessage):
+ * Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:
+ (WebKit::TestWithoutAttributes::didReceiveMessage):
+ (WebKit::TestWithoutAttributes::didReceiveSyncMessage):
+ * UIProcess/ProvisionalPageProxy.cpp:
+ (WebKit::ProvisionalPageProxy::didReceiveMessage):
+
2021-09-07 Per Arne <[email protected]>
Fix incorrect preprocess guard in WebContent sandbox
Modified: trunk/Source/WebKit/Platform/IPC/HandleMessage.h (282114 => 282115)
--- trunk/Source/WebKit/Platform/IPC/HandleMessage.h 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Platform/IPC/HandleMessage.h 2021-09-07 23:32:28 UTC (rev 282115)
@@ -27,8 +27,13 @@
#include "ArgumentCoders.h"
#include "DataReference.h"
+#include "Logging.h"
+#include "MessageArgumentDescriptions.h"
+#include "MessageNames.h"
#include "StreamServerConnection.h"
+#include <WebCore/RuntimeApplicationChecks.h>
#include <wtf/CompletionHandler.h>
+#include <wtf/ProcessID.h>
#include <wtf/StdLibExtras.h>
namespace IPC {
@@ -35,6 +40,80 @@
class Connection;
+// IPC message logging. Only enabled in DEBUG builds.
+//
+// Message argument values appear as "..." if no operator<<(TextStream&) is
+// implemented for them.
+
+constexpr unsigned loggingContainerSizeLimit = 200;
+
+#if !LOG_DISABLED
+enum class ForReply : bool { No, Yes };
+
+inline TextStream textStreamForLogging(const Connection& connection, MessageName messageName, ForReply forReply)
+{
+ TextStream stream(TextStream::LineMode::SingleLine, { }, loggingContainerSizeLimit);
+ stream << '[';
+#if OS(DARWIN)
+ // The remote process ID is not available when the connection was not made
+ // for an XPC service, e.g. for the Web -> GPU process connection.
+ if (connection.remoteProcessID())
+ stream << connection.remoteProcessID() << ' ';
+#else
+ UNUSED_PARAM(connection);
+#endif
+ auto arrow = forReply == ForReply::Yes ? "<- " : "-> ";
+ stream << arrow << WebCore::processTypeDescription(WebCore::processType()) << ' ' << getCurrentProcessID() << "] " << description(messageName);
+ if (forReply == ForReply::Yes)
+ stream << " Reply";
+ return stream;
+}
+#endif
+
+template<typename ArgsTuple, size_t... ArgsIndex>
+void logMessageImpl(const Connection& connection, MessageName messageName, const ArgsTuple& args, std::index_sequence<ArgsIndex...>)
+{
+#if !LOG_DISABLED
+ auto stream = textStreamForLogging(connection, messageName, ForReply::No);
+
+ if (auto argumentDescriptions = messageArgumentDescriptions(messageName))
+ (stream.dumpProperty((*argumentDescriptions)[ArgsIndex].name, ValueOrEllipsis(std::get<ArgsIndex>(args))), ...);
+
+ LOG(IPCMessages, "%s", stream.release().utf8().data());
+#else
+ UNUSED_PARAM(connection);
+ UNUSED_PARAM(messageName);
+ UNUSED_PARAM(args);
+#endif
+}
+
+template<typename ArgsTuple, typename ArgsIndices = std::make_index_sequence<std::tuple_size<ArgsTuple>::value>>
+void logMessage(const Connection& connection, MessageName messageName, const ArgsTuple& args)
+{
+ logMessageImpl(connection, messageName, args, ArgsIndices());
+}
+
+template<typename... T>
+void logReply(const Connection& connection, MessageName messageName, const T&... args)
+{
+#if !LOG_DISABLED
+ if (!sizeof...(T))
+ return;
+
+ auto stream = textStreamForLogging(connection, messageName, ForReply::Yes);
+
+ unsigned argIndex = 0;
+ if (auto argumentDescriptions = messageReplyArgumentDescriptions(messageName))
+ (stream.dumpProperty((*argumentDescriptions)[argIndex++].name, ValueOrEllipsis(args)), ...);
+
+ LOG(IPCMessages, "%s", stream.release().utf8().data());
+#else
+ UNUSED_PARAM(connection);
+ UNUSED_PARAM(messageName);
+ (UNUSED_PARAM(args), ...);
+#endif
+}
+
// Dispatch functions with no reply arguments.
template <typename C, typename MF, typename ArgsTuple, size_t... ArgsIndex>
@@ -109,7 +188,7 @@
};
template<typename T, typename C, typename MF>
-void handleMessage(Decoder& decoder, C* object, MF function)
+void handleMessage(Connection& connection, Decoder& decoder, C* object, MF function)
{
std::optional<typename CodingType<typename T::Arguments>::Type> arguments;
decoder >> arguments;
@@ -116,16 +195,19 @@
if (UNLIKELY(!arguments))
return;
+ logMessage(connection, T::name(), *arguments);
callMemberFunction(WTFMove(*arguments), object, function);
}
template<typename T, typename C, typename MF>
-void handleMessage(Connection& connection, Decoder& decoder, C* object, MF function)
+void handleMessageWantsConnection(Connection& connection, Decoder& decoder, C* object, MF function)
{
std::optional<typename CodingType<typename T::Arguments>::Type> arguments;
decoder >> arguments;
if (UNLIKELY(!arguments))
return;
+
+ logMessage(connection, T::name(), *arguments);
callMemberFunction(connection, WTFMove(*arguments), object, function);
}
@@ -138,8 +220,10 @@
return false;
typename T::DelayedReply completionHandler = [replyEncoder = WTFMove(replyEncoder), connection = makeRef(connection)] (auto&&... args) mutable {
+ logReply(connection, T::name(), args...);
T::send(WTFMove(replyEncoder), WTFMove(connection), args...);
};
+ logMessage(connection, T::name(), *arguments);
callMemberFunction(WTFMove(*arguments), WTFMove(completionHandler), object, function);
return true;
}
@@ -153,8 +237,10 @@
return false;
typename T::DelayedReply completionHandler = [replyEncoder = WTFMove(replyEncoder), connection = makeRef(connection)] (auto&&... args) mutable {
+ logReply(connection, T::name(), args...);
T::send(WTFMove(replyEncoder), WTFMove(connection), args...);
};
+ logMessage(connection, T::name(), *arguments);
callMemberFunction(connection, WTFMove(*arguments), WTFMove(completionHandler), object, function);
return true;
}
@@ -172,8 +258,10 @@
return;
typename T::DelayedReply completionHandler = [syncRequestID, connection = makeRef(connection)] (auto&&... args) mutable {
+ logReply(connection->connection(), T::name(), args...);
connection->sendSyncReply<T>(syncRequestID, args...);
};
+ logMessage(connection.connection(), T::name(), *arguments);
callMemberFunction(WTFMove(*arguments), WTFMove(completionHandler), object, function);
}
@@ -192,8 +280,10 @@
typename T::AsyncReply completionHandler = { [listenerID = *listenerID, connection = makeRef(connection)] (auto&&... args) mutable {
auto encoder = makeUniqueRef<Encoder>(T::asyncMessageReplyName(), listenerID);
+ logReply(connection, T::name(), args...);
T::send(WTFMove(encoder), WTFMove(connection), args...);
}, T::callbackThread };
+ logMessage(connection, T::name(), *arguments);
callMemberFunction(WTFMove(*arguments), WTFMove(completionHandler), object, function);
}
@@ -212,8 +302,10 @@
typename T::AsyncReply completionHandler = { [listenerID = *listenerID, connection = makeRef(connection)] (auto&&... args) mutable {
auto encoder = makeUniqueRef<Encoder>(T::asyncMessageReplyName(), listenerID);
+ logReply(connection, T::name(), args...);
T::send(WTFMove(encoder), WTFMove(connection), args...);
}, T::callbackThread };
+ logMessage(connection, T::name(), *arguments);
callMemberFunction(connection, WTFMove(*arguments), WTFMove(completionHandler), object, function);
}
Modified: trunk/Source/WebKit/Platform/Logging.h (282114 => 282115)
--- trunk/Source/WebKit/Platform/Logging.h 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Platform/Logging.h 2021-09-07 23:32:28 UTC (rev 282115)
@@ -56,6 +56,7 @@
M(Fullscreen) \
M(Gamepad) \
M(IPC) \
+ M(IPCMessages) \
M(ITPDebug) \
M(IconDatabase) \
M(Images) \
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2021-09-07 23:32:28 UTC (rev 282115)
@@ -567,17 +567,17 @@
dispatch_function = 'handleMessage'
if message.has_attribute(ASYNC_ATTRIBUTE):
dispatch_function += 'Async'
- dispatch_function_args.insert(0, 'connection')
if message.has_attribute(WANTS_CONNECTION_ATTRIBUTE):
- if message.has_attribute(ASYNC_ATTRIBUTE):
- dispatch_function += 'WantsConnection'
- else:
- dispatch_function_args.insert(0, 'connection')
+ dispatch_function += 'WantsConnection'
+ connection = 'connection'
+ if receiver.has_attribute(STREAM_ATTRIBUTE):
+ connection = 'connection.connection()'
+
result = []
result.append(' if (decoder.messageName() == Messages::%s::%s::name())\n' % (receiver.name, message.name))
- result.append(' return IPC::%s<Messages::%s::%s>(%s);\n' % (dispatch_function, receiver.name, message.name, ', '.join(dispatch_function_args)))
+ result.append(' return IPC::%s<Messages::%s::%s>(%s, %s);\n' % (dispatch_function, receiver.name, message.name, connection, ', '.join(dispatch_function_args)))
return surround_in_condition(''.join(result), message.condition)
@@ -585,12 +585,11 @@
dispatch_function = 'handleMessage'
if message.has_attribute(SYNCHRONOUS_ATTRIBUTE):
dispatch_function += 'Synchronous'
- if message.has_attribute(WANTS_CONNECTION_ATTRIBUTE):
- dispatch_function += 'WantsConnection'
if message.has_attribute(ASYNC_ATTRIBUTE):
dispatch_function += 'Async'
+ if message.has_attribute(WANTS_CONNECTION_ATTRIBUTE):
+ dispatch_function += 'WantsConnection'
- wants_connection = message.has_attribute(SYNCHRONOUS_ATTRIBUTE) or message.has_attribute(WANTS_CONNECTION_ATTRIBUTE)
maybe_reply_encoder = ", *replyEncoder"
if receiver.has_attribute(STREAM_ATTRIBUTE):
maybe_reply_encoder = ''
@@ -599,7 +598,7 @@
result = []
result.append(' if (decoder.messageName() == Messages::%s::%s::name())\n' % (receiver.name, message.name))
- result.append(' return IPC::%s<Messages::%s::%s>(%sdecoder%s, this, &%s);\n' % (dispatch_function, receiver.name, message.name, 'connection, ' if wants_connection else '', maybe_reply_encoder, handler_function(receiver, message)))
+ result.append(' return IPC::%s<Messages::%s::%s>(connection, decoder%s, this, &%s);\n' % (dispatch_function, receiver.name, message.name, maybe_reply_encoder, handler_function(receiver, message)))
return surround_in_condition(''.join(result), message.condition)
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -42,7 +42,7 @@
auto protectedThis = makeRef(*this);
#if USE(AVFOUNDATION)
if (decoder.messageName() == Messages::TestWithCVPixelBuffer::SendCVPixelBuffer::name())
- return IPC::handleMessage<Messages::TestWithCVPixelBuffer::SendCVPixelBuffer>(decoder, this, &TestWithCVPixelBuffer::sendCVPixelBuffer);
+ return IPC::handleMessage<Messages::TestWithCVPixelBuffer::SendCVPixelBuffer>(connection, decoder, this, &TestWithCVPixelBuffer::sendCVPixelBuffer);
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
@@ -58,7 +58,7 @@
auto protectedThis = makeRef(*this);
#if USE(AVFOUNDATION)
if (decoder.messageName() == Messages::TestWithCVPixelBuffer::ReceiveCVPixelBuffer::name())
- return IPC::handleMessage<Messages::TestWithCVPixelBuffer::ReceiveCVPixelBuffer>(decoder, *replyEncoder, this, &TestWithCVPixelBuffer::receiveCVPixelBuffer);
+ return IPC::handleMessage<Messages::TestWithCVPixelBuffer::ReceiveCVPixelBuffer>(connection, decoder, *replyEncoder, this, &TestWithCVPixelBuffer::receiveCVPixelBuffer);
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -42,11 +42,11 @@
auto protectedThis = makeRef(*this);
#if PLATFORM(COCOA)
if (decoder.messageName() == Messages::TestWithIfMessage::LoadURL::name())
- return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>(decoder, this, &TestWithIfMessage::loadURL);
+ return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>(connection, decoder, this, &TestWithIfMessage::loadURL);
#endif
#if PLATFORM(GTK)
if (decoder.messageName() == Messages::TestWithIfMessage::LoadURL::name())
- return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>(decoder, this, &TestWithIfMessage::loadURL);
+ return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>(connection, decoder, this, &TestWithIfMessage::loadURL);
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -39,7 +39,7 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithImageData::SendImageData::name())
- return IPC::handleMessage<Messages::TestWithImageData::SendImageData>(decoder, this, &TestWithImageData::sendImageData);
+ return IPC::handleMessage<Messages::TestWithImageData::SendImageData>(connection, decoder, this, &TestWithImageData::sendImageData);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
#if ENABLE(IPC_TESTING_API)
@@ -53,7 +53,7 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithImageData::ReceiveImageData::name())
- return IPC::handleMessage<Messages::TestWithImageData::ReceiveImageData>(decoder, *replyEncoder, this, &TestWithImageData::receiveImageData);
+ return IPC::handleMessage<Messages::TestWithImageData::ReceiveImageData>(connection, decoder, *replyEncoder, this, &TestWithImageData::receiveImageData);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -84,50 +84,50 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::LoadURL::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadURL>(decoder, this, &TestWithLegacyReceiver::loadURL);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadURL>(connection, decoder, this, &TestWithLegacyReceiver::loadURL);
#if ENABLE(TOUCH_EVENTS)
if (decoder.messageName() == Messages::TestWithLegacyReceiver::LoadSomething::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomething>(decoder, this, &TestWithLegacyReceiver::loadSomething);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomething>(connection, decoder, this, &TestWithLegacyReceiver::loadSomething);
#endif
#if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION || SOME_OTHER_MESSAGE_CONDITION))
if (decoder.messageName() == Messages::TestWithLegacyReceiver::TouchEvent::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::TouchEvent>(decoder, this, &TestWithLegacyReceiver::touchEvent);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::TouchEvent>(connection, decoder, this, &TestWithLegacyReceiver::touchEvent);
#endif
#if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION && SOME_OTHER_MESSAGE_CONDITION))
if (decoder.messageName() == Messages::TestWithLegacyReceiver::AddEvent::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::AddEvent>(decoder, this, &TestWithLegacyReceiver::addEvent);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::AddEvent>(connection, decoder, this, &TestWithLegacyReceiver::addEvent);
#endif
#if ENABLE(TOUCH_EVENTS)
if (decoder.messageName() == Messages::TestWithLegacyReceiver::LoadSomethingElse::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomethingElse>(decoder, this, &TestWithLegacyReceiver::loadSomethingElse);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomethingElse>(connection, decoder, this, &TestWithLegacyReceiver::loadSomethingElse);
#endif
if (decoder.messageName() == Messages::TestWithLegacyReceiver::DidReceivePolicyDecision::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidReceivePolicyDecision>(decoder, this, &TestWithLegacyReceiver::didReceivePolicyDecision);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidReceivePolicyDecision>(connection, decoder, this, &TestWithLegacyReceiver::didReceivePolicyDecision);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::Close::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::Close>(decoder, this, &TestWithLegacyReceiver::close);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::Close>(connection, decoder, this, &TestWithLegacyReceiver::close);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::PreferencesDidChange::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::PreferencesDidChange>(decoder, this, &TestWithLegacyReceiver::preferencesDidChange);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::PreferencesDidChange>(connection, decoder, this, &TestWithLegacyReceiver::preferencesDidChange);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::SendDoubleAndFloat::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendDoubleAndFloat>(decoder, this, &TestWithLegacyReceiver::sendDoubleAndFloat);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendDoubleAndFloat>(connection, decoder, this, &TestWithLegacyReceiver::sendDoubleAndFloat);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::SendInts::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendInts>(decoder, this, &TestWithLegacyReceiver::sendInts);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendInts>(connection, decoder, this, &TestWithLegacyReceiver::sendInts);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::TestParameterAttributes::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::TestParameterAttributes>(decoder, this, &TestWithLegacyReceiver::testParameterAttributes);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::TestParameterAttributes>(connection, decoder, this, &TestWithLegacyReceiver::testParameterAttributes);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::TemplateTest::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::TemplateTest>(decoder, this, &TestWithLegacyReceiver::templateTest);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::TemplateTest>(connection, decoder, this, &TestWithLegacyReceiver::templateTest);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::SetVideoLayerID::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::SetVideoLayerID>(decoder, this, &TestWithLegacyReceiver::setVideoLayerID);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::SetVideoLayerID>(connection, decoder, this, &TestWithLegacyReceiver::setVideoLayerID);
#if PLATFORM(MAC)
if (decoder.messageName() == Messages::TestWithLegacyReceiver::DidCreateWebProcessConnection::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidCreateWebProcessConnection>(decoder, this, &TestWithLegacyReceiver::didCreateWebProcessConnection);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidCreateWebProcessConnection>(connection, decoder, this, &TestWithLegacyReceiver::didCreateWebProcessConnection);
#endif
#if ENABLE(DEPRECATED_FEATURE)
if (decoder.messageName() == Messages::TestWithLegacyReceiver::DeprecatedOperation::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::DeprecatedOperation>(decoder, this, &TestWithLegacyReceiver::deprecatedOperation);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::DeprecatedOperation>(connection, decoder, this, &TestWithLegacyReceiver::deprecatedOperation);
#endif
#if ENABLE(EXPERIMENTAL_FEATURE)
if (decoder.messageName() == Messages::TestWithLegacyReceiver::ExperimentalOperation::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::ExperimentalOperation>(decoder, this, &TestWithLegacyReceiver::experimentalOperation);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::ExperimentalOperation>(connection, decoder, this, &TestWithLegacyReceiver::experimentalOperation);
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
@@ -142,11 +142,11 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::CreatePlugin::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::CreatePlugin>(decoder, *replyEncoder, this, &TestWithLegacyReceiver::createPlugin);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::CreatePlugin>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::createPlugin);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::RunJavaScriptAlert::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::RunJavaScriptAlert>(decoder, *replyEncoder, this, &TestWithLegacyReceiver::runJavaScriptAlert);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::RunJavaScriptAlert>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::runJavaScriptAlert);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::GetPlugins::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::GetPlugins>(decoder, *replyEncoder, this, &TestWithLegacyReceiver::getPlugins);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::GetPlugins>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::getPlugins);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::GetPluginProcessConnection::name())
return IPC::handleMessageSynchronous<Messages::TestWithLegacyReceiver::GetPluginProcessConnection>(connection, decoder, replyEncoder, this, &TestWithLegacyReceiver::getPluginProcessConnection);
if (decoder.messageName() == Messages::TestWithLegacyReceiver::TestMultipleAttributes::name())
@@ -153,7 +153,7 @@
return IPC::handleMessageSynchronousWantsConnection<Messages::TestWithLegacyReceiver::TestMultipleAttributes>(connection, decoder, replyEncoder, this, &TestWithLegacyReceiver::testMultipleAttributes);
#if PLATFORM(MAC)
if (decoder.messageName() == Messages::TestWithLegacyReceiver::InterpretKeyEvent::name())
- return IPC::handleMessage<Messages::TestWithLegacyReceiver::InterpretKeyEvent>(decoder, *replyEncoder, this, &TestWithLegacyReceiver::interpretKeyEvent);
+ return IPC::handleMessage<Messages::TestWithLegacyReceiver::InterpretKeyEvent>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::interpretKeyEvent);
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -36,7 +36,7 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithSemaphore::SendSemaphore::name())
- return IPC::handleMessage<Messages::TestWithSemaphore::SendSemaphore>(decoder, this, &TestWithSemaphore::sendSemaphore);
+ return IPC::handleMessage<Messages::TestWithSemaphore::SendSemaphore>(connection, decoder, this, &TestWithSemaphore::sendSemaphore);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
#if ENABLE(IPC_TESTING_API)
@@ -50,7 +50,7 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithSemaphore::ReceiveSemaphore::name())
- return IPC::handleMessage<Messages::TestWithSemaphore::ReceiveSemaphore>(decoder, *replyEncoder, this, &TestWithSemaphore::receiveSemaphore);
+ return IPC::handleMessage<Messages::TestWithSemaphore::ReceiveSemaphore>(connection, decoder, *replyEncoder, this, &TestWithSemaphore::receiveSemaphore);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -36,7 +36,7 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithStreamBuffer::SendStreamBuffer::name())
- return IPC::handleMessage<Messages::TestWithStreamBuffer::SendStreamBuffer>(decoder, this, &TestWithStreamBuffer::sendStreamBuffer);
+ return IPC::handleMessage<Messages::TestWithStreamBuffer::SendStreamBuffer>(connection, decoder, this, &TestWithStreamBuffer::sendStreamBuffer);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
#if ENABLE(IPC_TESTING_API)
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -39,20 +39,20 @@
void TestWithStream::didReceiveStreamMessage(IPC::StreamServerConnectionBase& connection, IPC::Decoder& decoder)
{
if (decoder.messageName() == Messages::TestWithStream::SendString::name())
- return IPC::handleMessage<Messages::TestWithStream::SendString>(decoder, this, &TestWithStream::sendString);
+ return IPC::handleMessage<Messages::TestWithStream::SendString>(connection.connection(), decoder, this, &TestWithStream::sendString);
#if PLATFORM(COCOA)
if (decoder.messageName() == Messages::TestWithStream::SendMachSendRight::name())
- return IPC::handleMessage<Messages::TestWithStream::SendMachSendRight>(decoder, this, &TestWithStream::sendMachSendRight);
+ return IPC::handleMessage<Messages::TestWithStream::SendMachSendRight>(connection.connection(), decoder, this, &TestWithStream::sendMachSendRight);
#endif
if (decoder.messageName() == Messages::TestWithStream::SendStringSynchronized::name())
- return IPC::handleMessage<Messages::TestWithStream::SendStringSynchronized>(decoder, this, &TestWithStream::sendStringSynchronized);
+ return IPC::handleMessage<Messages::TestWithStream::SendStringSynchronized>(connection, decoder, this, &TestWithStream::sendStringSynchronized);
#if PLATFORM(COCOA)
if (decoder.messageName() == Messages::TestWithStream::ReceiveMachSendRight::name())
- return IPC::handleMessage<Messages::TestWithStream::ReceiveMachSendRight>(decoder, this, &TestWithStream::receiveMachSendRight);
+ return IPC::handleMessage<Messages::TestWithStream::ReceiveMachSendRight>(connection, decoder, this, &TestWithStream::receiveMachSendRight);
#endif
#if PLATFORM(COCOA)
if (decoder.messageName() == Messages::TestWithStream::SendAndReceiveMachSendRight::name())
- return IPC::handleMessage<Messages::TestWithStream::SendAndReceiveMachSendRight>(decoder, this, &TestWithStream::sendAndReceiveMachSendRight);
+ return IPC::handleMessage<Messages::TestWithStream::SendAndReceiveMachSendRight>(connection, decoder, this, &TestWithStream::sendAndReceiveMachSendRight);
#endif
UNUSED_PARAM(decoder);
UNUSED_PARAM(connection);
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -170,7 +170,7 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithSuperclass::LoadURL::name())
- return IPC::handleMessage<Messages::TestWithSuperclass::LoadURL>(decoder, this, &TestWithSuperclass::loadURL);
+ return IPC::handleMessage<Messages::TestWithSuperclass::LoadURL>(connection, decoder, this, &TestWithSuperclass::loadURL);
#if ENABLE(TEST_FEATURE)
if (decoder.messageName() == Messages::TestWithSuperclass::TestAsyncMessage::name())
return IPC::handleMessageAsync<Messages::TestWithSuperclass::TestAsyncMessage>(connection, decoder, this, &TestWithSuperclass::testAsyncMessage);
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp (282114 => 282115)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -84,50 +84,50 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithoutAttributes::LoadURL::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::LoadURL>(decoder, this, &TestWithoutAttributes::loadURL);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::LoadURL>(connection, decoder, this, &TestWithoutAttributes::loadURL);
#if ENABLE(TOUCH_EVENTS)
if (decoder.messageName() == Messages::TestWithoutAttributes::LoadSomething::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomething>(decoder, this, &TestWithoutAttributes::loadSomething);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomething>(connection, decoder, this, &TestWithoutAttributes::loadSomething);
#endif
#if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION || SOME_OTHER_MESSAGE_CONDITION))
if (decoder.messageName() == Messages::TestWithoutAttributes::TouchEvent::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::TouchEvent>(decoder, this, &TestWithoutAttributes::touchEvent);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::TouchEvent>(connection, decoder, this, &TestWithoutAttributes::touchEvent);
#endif
#if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION && SOME_OTHER_MESSAGE_CONDITION))
if (decoder.messageName() == Messages::TestWithoutAttributes::AddEvent::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::AddEvent>(decoder, this, &TestWithoutAttributes::addEvent);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::AddEvent>(connection, decoder, this, &TestWithoutAttributes::addEvent);
#endif
#if ENABLE(TOUCH_EVENTS)
if (decoder.messageName() == Messages::TestWithoutAttributes::LoadSomethingElse::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomethingElse>(decoder, this, &TestWithoutAttributes::loadSomethingElse);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomethingElse>(connection, decoder, this, &TestWithoutAttributes::loadSomethingElse);
#endif
if (decoder.messageName() == Messages::TestWithoutAttributes::DidReceivePolicyDecision::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::DidReceivePolicyDecision>(decoder, this, &TestWithoutAttributes::didReceivePolicyDecision);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::DidReceivePolicyDecision>(connection, decoder, this, &TestWithoutAttributes::didReceivePolicyDecision);
if (decoder.messageName() == Messages::TestWithoutAttributes::Close::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::Close>(decoder, this, &TestWithoutAttributes::close);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::Close>(connection, decoder, this, &TestWithoutAttributes::close);
if (decoder.messageName() == Messages::TestWithoutAttributes::PreferencesDidChange::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::PreferencesDidChange>(decoder, this, &TestWithoutAttributes::preferencesDidChange);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::PreferencesDidChange>(connection, decoder, this, &TestWithoutAttributes::preferencesDidChange);
if (decoder.messageName() == Messages::TestWithoutAttributes::SendDoubleAndFloat::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::SendDoubleAndFloat>(decoder, this, &TestWithoutAttributes::sendDoubleAndFloat);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::SendDoubleAndFloat>(connection, decoder, this, &TestWithoutAttributes::sendDoubleAndFloat);
if (decoder.messageName() == Messages::TestWithoutAttributes::SendInts::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::SendInts>(decoder, this, &TestWithoutAttributes::sendInts);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::SendInts>(connection, decoder, this, &TestWithoutAttributes::sendInts);
if (decoder.messageName() == Messages::TestWithoutAttributes::TestParameterAttributes::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::TestParameterAttributes>(decoder, this, &TestWithoutAttributes::testParameterAttributes);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::TestParameterAttributes>(connection, decoder, this, &TestWithoutAttributes::testParameterAttributes);
if (decoder.messageName() == Messages::TestWithoutAttributes::TemplateTest::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::TemplateTest>(decoder, this, &TestWithoutAttributes::templateTest);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::TemplateTest>(connection, decoder, this, &TestWithoutAttributes::templateTest);
if (decoder.messageName() == Messages::TestWithoutAttributes::SetVideoLayerID::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::SetVideoLayerID>(decoder, this, &TestWithoutAttributes::setVideoLayerID);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::SetVideoLayerID>(connection, decoder, this, &TestWithoutAttributes::setVideoLayerID);
#if PLATFORM(MAC)
if (decoder.messageName() == Messages::TestWithoutAttributes::DidCreateWebProcessConnection::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::DidCreateWebProcessConnection>(decoder, this, &TestWithoutAttributes::didCreateWebProcessConnection);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::DidCreateWebProcessConnection>(connection, decoder, this, &TestWithoutAttributes::didCreateWebProcessConnection);
#endif
#if ENABLE(DEPRECATED_FEATURE)
if (decoder.messageName() == Messages::TestWithoutAttributes::DeprecatedOperation::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::DeprecatedOperation>(decoder, this, &TestWithoutAttributes::deprecatedOperation);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::DeprecatedOperation>(connection, decoder, this, &TestWithoutAttributes::deprecatedOperation);
#endif
#if ENABLE(EXPERIMENTAL_FEATURE)
if (decoder.messageName() == Messages::TestWithoutAttributes::ExperimentalOperation::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::ExperimentalOperation>(decoder, this, &TestWithoutAttributes::experimentalOperation);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::ExperimentalOperation>(connection, decoder, this, &TestWithoutAttributes::experimentalOperation);
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
@@ -142,11 +142,11 @@
{
auto protectedThis = makeRef(*this);
if (decoder.messageName() == Messages::TestWithoutAttributes::CreatePlugin::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::CreatePlugin>(decoder, *replyEncoder, this, &TestWithoutAttributes::createPlugin);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::CreatePlugin>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::createPlugin);
if (decoder.messageName() == Messages::TestWithoutAttributes::RunJavaScriptAlert::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::RunJavaScriptAlert>(decoder, *replyEncoder, this, &TestWithoutAttributes::runJavaScriptAlert);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::RunJavaScriptAlert>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::runJavaScriptAlert);
if (decoder.messageName() == Messages::TestWithoutAttributes::GetPlugins::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::GetPlugins>(decoder, *replyEncoder, this, &TestWithoutAttributes::getPlugins);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::GetPlugins>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::getPlugins);
if (decoder.messageName() == Messages::TestWithoutAttributes::GetPluginProcessConnection::name())
return IPC::handleMessageSynchronous<Messages::TestWithoutAttributes::GetPluginProcessConnection>(connection, decoder, replyEncoder, this, &TestWithoutAttributes::getPluginProcessConnection);
if (decoder.messageName() == Messages::TestWithoutAttributes::TestMultipleAttributes::name())
@@ -153,7 +153,7 @@
return IPC::handleMessageSynchronousWantsConnection<Messages::TestWithoutAttributes::TestMultipleAttributes>(connection, decoder, replyEncoder, this, &TestWithoutAttributes::testMultipleAttributes);
#if PLATFORM(MAC)
if (decoder.messageName() == Messages::TestWithoutAttributes::InterpretKeyEvent::name())
- return IPC::handleMessage<Messages::TestWithoutAttributes::InterpretKeyEvent>(decoder, *replyEncoder, this, &TestWithoutAttributes::interpretKeyEvent);
+ return IPC::handleMessage<Messages::TestWithoutAttributes::InterpretKeyEvent>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::interpretKeyEvent);
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
Modified: trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp (282114 => 282115)
--- trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp 2021-09-07 23:32:08 UTC (rev 282114)
+++ trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp 2021-09-07 23:32:28 UTC (rev 282115)
@@ -482,7 +482,7 @@
#if PLATFORM(COCOA)
if (decoder.messageName() == Messages::WebPageProxy::RegisterWebProcessAccessibilityToken::name()) {
- IPC::handleMessage<Messages::WebPageProxy::RegisterWebProcessAccessibilityToken>(decoder, this, &ProvisionalPageProxy::registerWebProcessAccessibilityToken);
+ IPC::handleMessage<Messages::WebPageProxy::RegisterWebProcessAccessibilityToken>(connection, decoder, this, &ProvisionalPageProxy::registerWebProcessAccessibilityToken);
return;
}
#endif
@@ -489,83 +489,83 @@
#if PLATFORM(GTK) || PLATFORM(WPE)
if (decoder.messageName() == Messages::WebPageProxy::BindAccessibilityTree::name()) {
- IPC::handleMessage<Messages::WebPageProxy::BindAccessibilityTree>(decoder, this, &ProvisionalPageProxy::bindAccessibilityTree);
+ IPC::handleMessage<Messages::WebPageProxy::BindAccessibilityTree>(connection, decoder, this, &ProvisionalPageProxy::bindAccessibilityTree);
return;
}
#endif
if (decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessageFromWebProcess::name()) {
- IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageFromWebProcess>(decoder, this, &ProvisionalPageProxy::logDiagnosticMessageFromWebProcess);
+ IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageFromWebProcess>(connection, decoder, this, &ProvisionalPageProxy::logDiagnosticMessageFromWebProcess);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacyFromWebProcess::name()) {
- IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacyFromWebProcess>(decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess);
+ IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacyFromWebProcess>(connection, decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessageWithValueDictionaryFromWebProcess::name()) {
- IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithValueDictionaryFromWebProcess>(decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess);
+ IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithValueDictionaryFromWebProcess>(connection, decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::StartURLSchemeTask::name()) {
- IPC::handleMessage<Messages::WebPageProxy::StartURLSchemeTask>(decoder, this, &ProvisionalPageProxy::startURLSchemeTask);
+ IPC::handleMessage<Messages::WebPageProxy::StartURLSchemeTask>(connection, decoder, this, &ProvisionalPageProxy::startURLSchemeTask);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DecidePolicyForNavigationActionAsync::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForNavigationActionAsync>(decoder, this, &ProvisionalPageProxy::decidePolicyForNavigationActionAsync);
+ IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForNavigationActionAsync>(connection, decoder, this, &ProvisionalPageProxy::decidePolicyForNavigationActionAsync);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DecidePolicyForResponse::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForResponse>(decoder, this, &ProvisionalPageProxy::decidePolicyForResponse);
+ IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForResponse>(connection, decoder, this, &ProvisionalPageProxy::decidePolicyForResponse);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidChangeProvisionalURLForFrame::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidChangeProvisionalURLForFrame>(decoder, this, &ProvisionalPageProxy::didChangeProvisionalURLForFrame);
+ IPC::handleMessage<Messages::WebPageProxy::DidChangeProvisionalURLForFrame>(connection, decoder, this, &ProvisionalPageProxy::didChangeProvisionalURLForFrame);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidNavigateWithNavigationData::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidNavigateWithNavigationData>(decoder, this, &ProvisionalPageProxy::didNavigateWithNavigationData);
+ IPC::handleMessage<Messages::WebPageProxy::DidNavigateWithNavigationData>(connection, decoder, this, &ProvisionalPageProxy::didNavigateWithNavigationData);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidPerformClientRedirect::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidPerformClientRedirect>(decoder, this, &ProvisionalPageProxy::didPerformClientRedirect);
+ IPC::handleMessage<Messages::WebPageProxy::DidPerformClientRedirect>(connection, decoder, this, &ProvisionalPageProxy::didPerformClientRedirect);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidCreateMainFrame::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidCreateMainFrame>(decoder, this, &ProvisionalPageProxy::didCreateMainFrame);
+ IPC::handleMessage<Messages::WebPageProxy::DidCreateMainFrame>(connection, decoder, this, &ProvisionalPageProxy::didCreateMainFrame);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidStartProvisionalLoadForFrame::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidStartProvisionalLoadForFrame>(decoder, this, &ProvisionalPageProxy::didStartProvisionalLoadForFrame);
+ IPC::handleMessage<Messages::WebPageProxy::DidStartProvisionalLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didStartProvisionalLoadForFrame);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidFailProvisionalLoadForFrame::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidFailProvisionalLoadForFrame>(decoder, this, &ProvisionalPageProxy::didFailProvisionalLoadForFrame);
+ IPC::handleMessage<Messages::WebPageProxy::DidFailProvisionalLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didFailProvisionalLoadForFrame);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidCommitLoadForFrame::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidCommitLoadForFrame>(decoder, this, &ProvisionalPageProxy::didCommitLoadForFrame);
+ IPC::handleMessage<Messages::WebPageProxy::DidCommitLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didCommitLoadForFrame);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame>(decoder, this, &ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame);
+ IPC::handleMessage<Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame);
return;
}
if (decoder.messageName() == Messages::WebPageProxy::DidPerformServerRedirect::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidPerformServerRedirect>(decoder, this, &ProvisionalPageProxy::didPerformServerRedirect);
+ IPC::handleMessage<Messages::WebPageProxy::DidPerformServerRedirect>(connection, decoder, this, &ProvisionalPageProxy::didPerformServerRedirect);
return;
}
@@ -578,7 +578,7 @@
#if ENABLE(CONTENT_FILTERING)
if (decoder.messageName() == Messages::WebPageProxy::ContentFilterDidBlockLoadForFrame::name()) {
- IPC::handleMessage<Messages::WebPageProxy::ContentFilterDidBlockLoadForFrame>(decoder, this, &ProvisionalPageProxy::contentFilterDidBlockLoadForFrame);
+ IPC::handleMessage<Messages::WebPageProxy::ContentFilterDidBlockLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::contentFilterDidBlockLoadForFrame);
return;
}
#endif
@@ -585,7 +585,7 @@
#if HAVE(VISIBILITY_PROPAGATION_VIEW)
if (decoder.messageName() == Messages::WebPageProxy::DidCreateContextInWebProcessForVisibilityPropagation::name()) {
- IPC::handleMessage<Messages::WebPageProxy::DidCreateContextInWebProcessForVisibilityPropagation>(decoder, this, &ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation);
+ IPC::handleMessage<Messages::WebPageProxy::DidCreateContextInWebProcessForVisibilityPropagation>(connection, decoder, this, &ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation);
return;
}
#endif