Changeset 282115 in webkit
- Timestamp:
- Sep 7, 2021, 4:32:28 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 19 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/text/TextStream.h (modified) (8 diffs)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/RuntimeApplicationChecks.cpp (modified) (1 diff)
-
WebCore/platform/RuntimeApplicationChecks.h (modified) (2 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Platform/IPC/HandleMessage.h (modified) (8 diffs)
-
WebKit/Platform/Logging.h (modified) (1 diff)
-
WebKit/Scripts/webkit/messages.py (modified) (3 diffs)
-
WebKit/Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp (modified) (2 diffs)
-
WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp (modified) (1 diff)
-
WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp (modified) (2 diffs)
-
WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp (modified) (3 diffs)
-
WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp (modified) (2 diffs)
-
WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp (modified) (1 diff)
-
WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp (modified) (1 diff)
-
WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp (modified) (1 diff)
-
WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp (modified) (3 diffs)
-
WebKit/UIProcess/ProvisionalPageProxy.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r282105 r282115 1 2021-09-07 Cameron McCormack <heycam@apple.com> 2 3 Add an IPCMessages channel to log all IPC messages 4 https://bugs.webkit.org/show_bug.cgi?id=229664 5 <rdar://problem/82511640> 6 7 Reviewed by Alex Christensen. 8 9 Two changes to TextStream in this patch. 10 11 The first is a new argument to the constructor to allow limiting 12 the number of elements in a container when appending it to a 13 TextStream. This is intended to be used when the output is for 14 human consumption and could potentially be uselessly large. 15 16 The second is a value adapter ValueOrEllipsis. This allows appending 17 a value to a TextStream even if it doesn't have an 18 operator<<(TextStream&) defined. If it doesn't, then the fallback 19 value "..." is used instead. 20 21 An implementation detail of ValueOrEllipsis is a new type trait 22 supports_text_stream_insertion, which detects at compile time whether 23 a given type can be appended to a TextStream. It works by using 24 "expression SFINAE" and partial template specialization. 25 26 The base, unspecialized version of the template inherits from 27 std::false_type, and is selected for all types by default. 28 29 A partial specialization that uses decltype() to check whether a 30 `TextStream() << value` expression would compile inherits from 31 std::true_type. 32 33 Sadly, C++ SFINAE has a limitation that means template definitions 34 that would be instantiated inside the decltype() are not checked 35 to ensure they would compile. This would mean container types whose 36 elements are types that don't have an operator<< defined would still 37 report true from supports_text_stream_insertion. We work around this 38 by having more specific partial specializations for all of the container 39 types we have operator<< definitions for, which defer to the 40 supports_text_stream_insertion value for the element type(s). 41 42 If an operator<< is added for a new container type without a 43 corresponding supports_text_stream_insertion specialization, and that 44 type is used with ValueOrEllipsis, it will cause a compile error. 45 46 The supports_text_stream_insertion template takes six template 47 arguments, which looks odd, but is needed because all specializations 48 must have the same number (and kind) of template arguments. The six 49 include five type template arguments (which is how many HashMap has) 50 plus a size_t value template argument (for Vector's inlineCapacity 51 argument). 52 53 * wtf/text/TextStream.h: 54 (WTF::TextStream::TextStream): 55 (WTF::TextStream::containerSizeLimit const): 56 (WTF::operator<<): 57 (WTF::ValueOrEllipsis::ValueOrEllipsis): 58 1 59 2021-09-07 Chris Dumez <cdumez@apple.com> 2 60 -
trunk/Source/WTF/wtf/text/TextStream.h
r280651 r282115 54 54 55 55 enum class LineMode { SingleLine, MultipleLine }; 56 TextStream(LineMode lineMode = LineMode::MultipleLine, OptionSet<Formatting> formattingFlags = { } )56 TextStream(LineMode lineMode = LineMode::MultipleLine, OptionSet<Formatting> formattingFlags = { }, unsigned containerSizeLimit = 0) 57 57 : m_formattingFlags(formattingFlags) 58 58 , m_multiLineMode(lineMode == LineMode::MultipleLine) 59 , m_containerSizeLimit(containerSizeLimit) 59 60 { 60 61 } … … 112 113 113 114 WTF_EXPORT_PRIVATE void writeIndent(); 115 116 unsigned containerSizeLimit() const { return m_containerSizeLimit; } 114 117 115 118 // Stream manipulators. … … 175 178 OptionSet<Formatting> m_formattingFlags; 176 179 bool m_multiLineMode { true }; 180 unsigned m_containerSizeLimit { 0 }; 177 181 }; 178 182 … … 224 228 ts << "["; 225 229 226 unsigned size = vector.size(); 227 for (unsigned i = 0; i < size; ++i) { 228 ts << vector[i]; 229 if (i < size - 1) 230 unsigned count = 0; 231 for (const auto& value : vector) { 232 if (count) 230 233 ts << ", "; 231 } 234 ts << value; 235 if (++count == ts.containerSizeLimit()) 236 break; 237 } 238 239 if (count != vector.size()) 240 ts << ", ..."; 232 241 233 242 return ts << "]"; … … 263 272 ts << "{"; 264 273 265 bool first = true;274 unsigned count = 0; 266 275 for (const auto& keyValuePair : map) { 276 if (count) 277 ts << ", "; 267 278 ts << keyValuePair.key << ": " << keyValuePair.value; 268 if (!first) 269 ts << ", "; 270 first = false; 271 } 279 if (++count == ts.containerSizeLimit()) 280 break; 281 } 282 283 if (count != map.size()) 284 ts << ", ..."; 272 285 273 286 return ts << "}"; … … 279 292 ts << "["; 280 293 281 bool first = true;294 unsigned count = 0; 282 295 for (const auto& item : set) { 296 if (count) 297 ts << ", "; 283 298 ts << item; 284 if (!first) 285 ts << ", "; 286 first = false; 287 } 299 if (++count == ts.containerSizeLimit()) 300 break; 301 } 302 303 if (count != set.size()) 304 ts << ", ..."; 288 305 289 306 return ts << "]"; … … 304 321 } 305 322 323 template<typename, typename = void, typename = void, typename = void, typename = void, size_t = 0> 324 struct supports_text_stream_insertion : std::false_type { }; 325 326 template<typename T> 327 struct supports_text_stream_insertion<T, std::void_t<decltype(std::declval<TextStream&>() << std::declval<T>())>> : std::true_type { }; 328 329 template<typename ItemType, size_t inlineCapacity> 330 struct supports_text_stream_insertion<Vector<ItemType, inlineCapacity>> : supports_text_stream_insertion<ItemType> { }; 331 332 template<typename ValueArg, typename HashArg, typename TraitsArg> 333 struct supports_text_stream_insertion<HashSet<ValueArg, HashArg, TraitsArg>> : supports_text_stream_insertion<ValueArg> { }; 334 335 template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> 336 struct supports_text_stream_insertion<HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>> : std::conjunction<supports_text_stream_insertion<KeyArg>, supports_text_stream_insertion<MappedArg>> { }; 337 338 template<typename T, typename Traits> 339 struct supports_text_stream_insertion<Markable<T, Traits>> : supports_text_stream_insertion<T> { }; 340 341 template<typename T> 342 struct supports_text_stream_insertion<OptionSet<T>> : supports_text_stream_insertion<T> { }; 343 344 template<typename T> 345 struct supports_text_stream_insertion<std::optional<T>> : supports_text_stream_insertion<T> { }; 346 347 template<typename T> 348 struct supports_text_stream_insertion<WeakPtr<T>> : supports_text_stream_insertion<T> { }; 349 350 template<typename T> 351 struct supports_text_stream_insertion<RefPtr<T>> : supports_text_stream_insertion<T> { }; 352 353 template<typename T> 354 struct supports_text_stream_insertion<Ref<T>> : supports_text_stream_insertion<T> { }; 355 356 template<typename T> 357 struct ValueOrEllipsis { 358 explicit ValueOrEllipsis(const T& value) 359 : value(value) 360 { } 361 const T& value; 362 }; 363 364 template<typename T> 365 TextStream& operator<<(TextStream& ts, ValueOrEllipsis<T> item) 366 { 367 if constexpr (supports_text_stream_insertion<T>::value) 368 ts << item.value; 369 else 370 ts << "..."; 371 return ts; 372 } 373 306 374 // Deprecated. Use TextStream::writeIndent() instead. 307 375 WTF_EXPORT_PRIVATE void writeIndent(TextStream&, int indent); … … 310 378 311 379 using WTF::TextStream; 380 using WTF::ValueOrEllipsis; 312 381 using WTF::ValueOrNull; 313 382 using WTF::indent; -
trunk/Source/WebCore/ChangeLog
r282105 r282115 1 2021-09-07 Cameron McCormack <heycam@apple.com> 2 3 Add an IPCMessages channel to log all IPC messages 4 https://bugs.webkit.org/show_bug.cgi?id=229664 5 <rdar://problem/82511640> 6 7 Reviewed by Alex Christensen. 8 9 Add a way to get the type of process we're in as a string, for 10 logging. 11 12 * platform/RuntimeApplicationChecks.cpp: 13 (WebCore::processType): 14 (WebCore::processTypeDescription): 15 * platform/RuntimeApplicationChecks.h: 16 1 17 2021-09-07 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp
r278340 r282115 84 84 } 85 85 86 std::optional<AuxiliaryProcessType> processType() 87 { 88 return auxiliaryProcessType(); 89 } 90 91 const char* processTypeDescription(std::optional<AuxiliaryProcessType> type) 92 { 93 if (!type) 94 return "UI"; 95 96 switch (*type) { 97 case AuxiliaryProcessType::WebContent: 98 return "Web"; 99 case AuxiliaryProcessType::Network: 100 return "Network"; 101 case AuxiliaryProcessType::Plugin: 102 return "Plugin"; 103 #if ENABLE(GPU_PROCESS) 104 case AuxiliaryProcessType::GPU: 105 return "GPU"; 106 #endif 107 #if ENABLE(WEB_AUTHN) 108 case AuxiliaryProcessType::WebAuthn: 109 return "WebAuthn"; 110 #endif 111 } 112 return "Unknown"; 113 } 114 86 115 } // namespace WebCore -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.h
r275405 r282115 26 26 #pragma once 27 27 28 #include <optional> 28 29 #include <wtf/Forward.h> 29 30 … … 47 48 WEBCORE_EXPORT void setAuxiliaryProcessType(AuxiliaryProcessType); 48 49 WEBCORE_EXPORT bool checkAuxiliaryProcessType(AuxiliaryProcessType); 50 WEBCORE_EXPORT std::optional<AuxiliaryProcessType> processType(); 51 WEBCORE_EXPORT const char* processTypeDescription(std::optional<AuxiliaryProcessType>); 49 52 50 53 bool isInAuxiliaryProcess(); -
trunk/Source/WebKit/ChangeLog
r282114 r282115 1 2021-09-07 Cameron McCormack <heycam@apple.com> 2 3 Add an IPCMessages channel to log all IPC messages 4 https://bugs.webkit.org/show_bug.cgi?id=229664 5 <rdar://problem/82511640> 6 7 Reviewed by Alex Christensen. 8 9 This adds a new IPCMessages log channel, to which all IPC message names, 10 arguments, and return values are logged. To avoid performance impacts 11 when not logging, these are only enabled in debug builds. 12 13 ValueOrDefault is used when writing out each message argument to (1) 14 avoid having to add operator<<(TextStream&) defintions for all 15 argument types right now, and (2) to alleviate the need to add such a 16 definition when adding new IPC messages. The string "..." is output 17 for types with no operator<< defined. 18 19 The remote and local process IDs are included in the log message. The 20 remote process ID is only readily accessible on OS(DARWIN), as we can 21 grab it from the XPC connection. But not all IPC::Connections are 22 created for XPC connections. For example, the Web -> GPU process 23 connection is created by the UI process on behalf of the Web process, 24 and the IPC::Connection::Identifier does not have an XPC service 25 handle in it. So for now, we omit the remote process ID. (We'd need 26 to thread it through messages like CreateGPUConnectionToWebProcess 27 to have it available.) 28 29 Since we need the IPC::Connection object for logging now, all of the 30 handleMessage* functions take a connection, and the messages.py code 31 generator is updated accordingly. 32 33 * Platform/IPC/HandleMessage.h: 34 (IPC::textStreamForLogging): 35 (IPC::logMessageImpl): 36 (IPC::logMessage): 37 (IPC::logReply): 38 (IPC::handleMessage): 39 (IPC::handleMessageWantsConnection): 40 (IPC::handleMessageSynchronous): 41 (IPC::handleMessageSynchronousWantsConnection): 42 (IPC::handleMessageAsync): 43 (IPC::handleMessageAsyncWantsConnection): 44 * Platform/Logging.h: 45 * Scripts/webkit/messages.py: 46 (async_message_statement): 47 (sync_message_statement): 48 * Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp: 49 (WebKit::TestWithCVPixelBuffer::didReceiveMessage): 50 (WebKit::TestWithCVPixelBuffer::didReceiveSyncMessage): 51 * Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp: 52 (WebKit::TestWithIfMessage::didReceiveMessage): 53 * Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp: 54 (WebKit::TestWithImageData::didReceiveMessage): 55 (WebKit::TestWithImageData::didReceiveSyncMessage): 56 * Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp: 57 (WebKit::TestWithLegacyReceiver::didReceiveTestWithLegacyReceiverMessage): 58 (WebKit::TestWithLegacyReceiver::didReceiveSyncTestWithLegacyReceiverMessage): 59 * Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp: 60 (WebKit::TestWithSemaphore::didReceiveMessage): 61 (WebKit::TestWithSemaphore::didReceiveSyncMessage): 62 * Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp: 63 (WebKit::TestWithStreamBuffer::didReceiveMessage): 64 * Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp: 65 (WebKit::TestWithStream::didReceiveStreamMessage): 66 * Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp: 67 (WebKit::TestWithSuperclass::didReceiveMessage): 68 * Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp: 69 (WebKit::TestWithoutAttributes::didReceiveMessage): 70 (WebKit::TestWithoutAttributes::didReceiveSyncMessage): 71 * UIProcess/ProvisionalPageProxy.cpp: 72 (WebKit::ProvisionalPageProxy::didReceiveMessage): 73 1 74 2021-09-07 Per Arne <pvollan@apple.com> 2 75 -
trunk/Source/WebKit/Platform/IPC/HandleMessage.h
r281737 r282115 28 28 #include "ArgumentCoders.h" 29 29 #include "DataReference.h" 30 #include "Logging.h" 31 #include "MessageArgumentDescriptions.h" 32 #include "MessageNames.h" 30 33 #include "StreamServerConnection.h" 34 #include <WebCore/RuntimeApplicationChecks.h> 31 35 #include <wtf/CompletionHandler.h> 36 #include <wtf/ProcessID.h> 32 37 #include <wtf/StdLibExtras.h> 33 38 … … 35 40 36 41 class Connection; 42 43 // IPC message logging. Only enabled in DEBUG builds. 44 // 45 // Message argument values appear as "..." if no operator<<(TextStream&) is 46 // implemented for them. 47 48 constexpr unsigned loggingContainerSizeLimit = 200; 49 50 #if !LOG_DISABLED 51 enum class ForReply : bool { No, Yes }; 52 53 inline TextStream textStreamForLogging(const Connection& connection, MessageName messageName, ForReply forReply) 54 { 55 TextStream stream(TextStream::LineMode::SingleLine, { }, loggingContainerSizeLimit); 56 stream << '['; 57 #if OS(DARWIN) 58 // The remote process ID is not available when the connection was not made 59 // for an XPC service, e.g. for the Web -> GPU process connection. 60 if (connection.remoteProcessID()) 61 stream << connection.remoteProcessID() << ' '; 62 #else 63 UNUSED_PARAM(connection); 64 #endif 65 auto arrow = forReply == ForReply::Yes ? "<- " : "-> "; 66 stream << arrow << WebCore::processTypeDescription(WebCore::processType()) << ' ' << getCurrentProcessID() << "] " << description(messageName); 67 if (forReply == ForReply::Yes) 68 stream << " Reply"; 69 return stream; 70 } 71 #endif 72 73 template<typename ArgsTuple, size_t... ArgsIndex> 74 void logMessageImpl(const Connection& connection, MessageName messageName, const ArgsTuple& args, std::index_sequence<ArgsIndex...>) 75 { 76 #if !LOG_DISABLED 77 auto stream = textStreamForLogging(connection, messageName, ForReply::No); 78 79 if (auto argumentDescriptions = messageArgumentDescriptions(messageName)) 80 (stream.dumpProperty((*argumentDescriptions)[ArgsIndex].name, ValueOrEllipsis(std::get<ArgsIndex>(args))), ...); 81 82 LOG(IPCMessages, "%s", stream.release().utf8().data()); 83 #else 84 UNUSED_PARAM(connection); 85 UNUSED_PARAM(messageName); 86 UNUSED_PARAM(args); 87 #endif 88 } 89 90 template<typename ArgsTuple, typename ArgsIndices = std::make_index_sequence<std::tuple_size<ArgsTuple>::value>> 91 void logMessage(const Connection& connection, MessageName messageName, const ArgsTuple& args) 92 { 93 logMessageImpl(connection, messageName, args, ArgsIndices()); 94 } 95 96 template<typename... T> 97 void logReply(const Connection& connection, MessageName messageName, const T&... args) 98 { 99 #if !LOG_DISABLED 100 if (!sizeof...(T)) 101 return; 102 103 auto stream = textStreamForLogging(connection, messageName, ForReply::Yes); 104 105 unsigned argIndex = 0; 106 if (auto argumentDescriptions = messageReplyArgumentDescriptions(messageName)) 107 (stream.dumpProperty((*argumentDescriptions)[argIndex++].name, ValueOrEllipsis(args)), ...); 108 109 LOG(IPCMessages, "%s", stream.release().utf8().data()); 110 #else 111 UNUSED_PARAM(connection); 112 UNUSED_PARAM(messageName); 113 (UNUSED_PARAM(args), ...); 114 #endif 115 } 37 116 38 117 // Dispatch functions with no reply arguments. … … 110 189 111 190 template<typename T, typename C, typename MF> 112 void handleMessage(Decoder& decoder, C* object, MF function) 113 { 114 std::optional<typename CodingType<typename T::Arguments>::Type> arguments; 115 decoder >> arguments; 116 if (UNLIKELY(!arguments)) 117 return; 118 191 void handleMessage(Connection& connection, Decoder& decoder, C* object, MF function) 192 { 193 std::optional<typename CodingType<typename T::Arguments>::Type> arguments; 194 decoder >> arguments; 195 if (UNLIKELY(!arguments)) 196 return; 197 198 logMessage(connection, T::name(), *arguments); 119 199 callMemberFunction(WTFMove(*arguments), object, function); 120 200 } 121 201 122 202 template<typename T, typename C, typename MF> 123 void handleMessage(Connection& connection, Decoder& decoder, C* object, MF function) 124 { 125 std::optional<typename CodingType<typename T::Arguments>::Type> arguments; 126 decoder >> arguments; 127 if (UNLIKELY(!arguments)) 128 return; 203 void handleMessageWantsConnection(Connection& connection, Decoder& decoder, C* object, MF function) 204 { 205 std::optional<typename CodingType<typename T::Arguments>::Type> arguments; 206 decoder >> arguments; 207 if (UNLIKELY(!arguments)) 208 return; 209 210 logMessage(connection, T::name(), *arguments); 129 211 callMemberFunction(connection, WTFMove(*arguments), object, function); 130 212 } … … 139 221 140 222 typename T::DelayedReply completionHandler = [replyEncoder = WTFMove(replyEncoder), connection = makeRef(connection)] (auto&&... args) mutable { 223 logReply(connection, T::name(), args...); 141 224 T::send(WTFMove(replyEncoder), WTFMove(connection), args...); 142 225 }; 226 logMessage(connection, T::name(), *arguments); 143 227 callMemberFunction(WTFMove(*arguments), WTFMove(completionHandler), object, function); 144 228 return true; … … 154 238 155 239 typename T::DelayedReply completionHandler = [replyEncoder = WTFMove(replyEncoder), connection = makeRef(connection)] (auto&&... args) mutable { 240 logReply(connection, T::name(), args...); 156 241 T::send(WTFMove(replyEncoder), WTFMove(connection), args...); 157 242 }; 243 logMessage(connection, T::name(), *arguments); 158 244 callMemberFunction(connection, WTFMove(*arguments), WTFMove(completionHandler), object, function); 159 245 return true; … … 173 259 174 260 typename T::DelayedReply completionHandler = [syncRequestID, connection = makeRef(connection)] (auto&&... args) mutable { 261 logReply(connection->connection(), T::name(), args...); 175 262 connection->sendSyncReply<T>(syncRequestID, args...); 176 263 }; 264 logMessage(connection.connection(), T::name(), *arguments); 177 265 callMemberFunction(WTFMove(*arguments), WTFMove(completionHandler), object, function); 178 266 } … … 193 281 typename T::AsyncReply completionHandler = { [listenerID = *listenerID, connection = makeRef(connection)] (auto&&... args) mutable { 194 282 auto encoder = makeUniqueRef<Encoder>(T::asyncMessageReplyName(), listenerID); 283 logReply(connection, T::name(), args...); 195 284 T::send(WTFMove(encoder), WTFMove(connection), args...); 196 285 }, T::callbackThread }; 286 logMessage(connection, T::name(), *arguments); 197 287 callMemberFunction(WTFMove(*arguments), WTFMove(completionHandler), object, function); 198 288 } … … 213 303 typename T::AsyncReply completionHandler = { [listenerID = *listenerID, connection = makeRef(connection)] (auto&&... args) mutable { 214 304 auto encoder = makeUniqueRef<Encoder>(T::asyncMessageReplyName(), listenerID); 305 logReply(connection, T::name(), args...); 215 306 T::send(WTFMove(encoder), WTFMove(connection), args...); 216 307 }, T::callbackThread }; 308 logMessage(connection, T::name(), *arguments); 217 309 callMemberFunction(connection, WTFMove(*arguments), WTFMove(completionHandler), object, function); 218 310 } -
trunk/Source/WebKit/Platform/Logging.h
r280811 r282115 57 57 M(Gamepad) \ 58 58 M(IPC) \ 59 M(IPCMessages) \ 59 60 M(ITPDebug) \ 60 61 M(IconDatabase) \ -
trunk/Source/WebKit/Scripts/webkit/messages.py
r282048 r282115 568 568 if message.has_attribute(ASYNC_ATTRIBUTE): 569 569 dispatch_function += 'Async' 570 dispatch_function_args.insert(0, 'connection')571 570 572 571 if message.has_attribute(WANTS_CONNECTION_ATTRIBUTE): 573 if message.has_attribute(ASYNC_ATTRIBUTE): 574 dispatch_function += 'WantsConnection' 575 else: 576 dispatch_function_args.insert(0, 'connection') 572 dispatch_function += 'WantsConnection' 573 574 connection = 'connection' 575 if receiver.has_attribute(STREAM_ATTRIBUTE): 576 connection = 'connection.connection()' 577 577 578 578 result = [] 579 579 result.append(' if (decoder.messageName() == Messages::%s::%s::name())\n' % (receiver.name, message.name)) 580 result.append(' return IPC::%s<Messages::%s::%s>(%s );\n' % (dispatch_function, receiver.name, message.name, ', '.join(dispatch_function_args)))580 result.append(' return IPC::%s<Messages::%s::%s>(%s, %s);\n' % (dispatch_function, receiver.name, message.name, connection, ', '.join(dispatch_function_args))) 581 581 return surround_in_condition(''.join(result), message.condition) 582 582 … … 586 586 if message.has_attribute(SYNCHRONOUS_ATTRIBUTE): 587 587 dispatch_function += 'Synchronous' 588 if message.has_attribute(WANTS_CONNECTION_ATTRIBUTE):589 dispatch_function += 'WantsConnection'590 588 if message.has_attribute(ASYNC_ATTRIBUTE): 591 589 dispatch_function += 'Async' 592 593 wants_connection = message.has_attribute(SYNCHRONOUS_ATTRIBUTE) or message.has_attribute(WANTS_CONNECTION_ATTRIBUTE) 590 if message.has_attribute(WANTS_CONNECTION_ATTRIBUTE): 591 dispatch_function += 'WantsConnection' 592 594 593 maybe_reply_encoder = ", *replyEncoder" 595 594 if receiver.has_attribute(STREAM_ATTRIBUTE): … … 600 599 result = [] 601 600 result.append(' if (decoder.messageName() == Messages::%s::%s::name())\n' % (receiver.name, message.name)) 602 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)))601 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))) 603 602 return surround_in_condition(''.join(result), message.condition) 604 603 -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp
r279221 r282115 43 43 #if USE(AVFOUNDATION) 44 44 if (decoder.messageName() == Messages::TestWithCVPixelBuffer::SendCVPixelBuffer::name()) 45 return IPC::handleMessage<Messages::TestWithCVPixelBuffer::SendCVPixelBuffer>( decoder, this, &TestWithCVPixelBuffer::sendCVPixelBuffer);45 return IPC::handleMessage<Messages::TestWithCVPixelBuffer::SendCVPixelBuffer>(connection, decoder, this, &TestWithCVPixelBuffer::sendCVPixelBuffer); 46 46 #endif 47 47 UNUSED_PARAM(connection); … … 59 59 #if USE(AVFOUNDATION) 60 60 if (decoder.messageName() == Messages::TestWithCVPixelBuffer::ReceiveCVPixelBuffer::name()) 61 return IPC::handleMessage<Messages::TestWithCVPixelBuffer::ReceiveCVPixelBuffer>( decoder, *replyEncoder, this, &TestWithCVPixelBuffer::receiveCVPixelBuffer);61 return IPC::handleMessage<Messages::TestWithCVPixelBuffer::ReceiveCVPixelBuffer>(connection, decoder, *replyEncoder, this, &TestWithCVPixelBuffer::receiveCVPixelBuffer); 62 62 #endif 63 63 UNUSED_PARAM(connection); -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp
r279221 r282115 43 43 #if PLATFORM(COCOA) 44 44 if (decoder.messageName() == Messages::TestWithIfMessage::LoadURL::name()) 45 return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>( decoder, this, &TestWithIfMessage::loadURL);45 return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>(connection, decoder, this, &TestWithIfMessage::loadURL); 46 46 #endif 47 47 #if PLATFORM(GTK) 48 48 if (decoder.messageName() == Messages::TestWithIfMessage::LoadURL::name()) 49 return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>( decoder, this, &TestWithIfMessage::loadURL);49 return IPC::handleMessage<Messages::TestWithIfMessage::LoadURL>(connection, decoder, this, &TestWithIfMessage::loadURL); 50 50 #endif 51 51 UNUSED_PARAM(connection); -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp
r279221 r282115 40 40 auto protectedThis = makeRef(*this); 41 41 if (decoder.messageName() == Messages::TestWithImageData::SendImageData::name()) 42 return IPC::handleMessage<Messages::TestWithImageData::SendImageData>( decoder, this, &TestWithImageData::sendImageData);42 return IPC::handleMessage<Messages::TestWithImageData::SendImageData>(connection, decoder, this, &TestWithImageData::sendImageData); 43 43 UNUSED_PARAM(connection); 44 44 UNUSED_PARAM(decoder); … … 54 54 auto protectedThis = makeRef(*this); 55 55 if (decoder.messageName() == Messages::TestWithImageData::ReceiveImageData::name()) 56 return IPC::handleMessage<Messages::TestWithImageData::ReceiveImageData>( decoder, *replyEncoder, this, &TestWithImageData::receiveImageData);56 return IPC::handleMessage<Messages::TestWithImageData::ReceiveImageData>(connection, decoder, *replyEncoder, this, &TestWithImageData::receiveImageData); 57 57 UNUSED_PARAM(connection); 58 58 UNUSED_PARAM(decoder); -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp
r279221 r282115 85 85 auto protectedThis = makeRef(*this); 86 86 if (decoder.messageName() == Messages::TestWithLegacyReceiver::LoadURL::name()) 87 return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadURL>( decoder, this, &TestWithLegacyReceiver::loadURL);87 return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadURL>(connection, decoder, this, &TestWithLegacyReceiver::loadURL); 88 88 #if ENABLE(TOUCH_EVENTS) 89 89 if (decoder.messageName() == Messages::TestWithLegacyReceiver::LoadSomething::name()) 90 return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomething>( decoder, this, &TestWithLegacyReceiver::loadSomething);90 return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomething>(connection, decoder, this, &TestWithLegacyReceiver::loadSomething); 91 91 #endif 92 92 #if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION || SOME_OTHER_MESSAGE_CONDITION)) 93 93 if (decoder.messageName() == Messages::TestWithLegacyReceiver::TouchEvent::name()) 94 return IPC::handleMessage<Messages::TestWithLegacyReceiver::TouchEvent>( decoder, this, &TestWithLegacyReceiver::touchEvent);94 return IPC::handleMessage<Messages::TestWithLegacyReceiver::TouchEvent>(connection, decoder, this, &TestWithLegacyReceiver::touchEvent); 95 95 #endif 96 96 #if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION && SOME_OTHER_MESSAGE_CONDITION)) 97 97 if (decoder.messageName() == Messages::TestWithLegacyReceiver::AddEvent::name()) 98 return IPC::handleMessage<Messages::TestWithLegacyReceiver::AddEvent>( decoder, this, &TestWithLegacyReceiver::addEvent);98 return IPC::handleMessage<Messages::TestWithLegacyReceiver::AddEvent>(connection, decoder, this, &TestWithLegacyReceiver::addEvent); 99 99 #endif 100 100 #if ENABLE(TOUCH_EVENTS) 101 101 if (decoder.messageName() == Messages::TestWithLegacyReceiver::LoadSomethingElse::name()) 102 return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomethingElse>( decoder, this, &TestWithLegacyReceiver::loadSomethingElse);102 return IPC::handleMessage<Messages::TestWithLegacyReceiver::LoadSomethingElse>(connection, decoder, this, &TestWithLegacyReceiver::loadSomethingElse); 103 103 #endif 104 104 if (decoder.messageName() == Messages::TestWithLegacyReceiver::DidReceivePolicyDecision::name()) 105 return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidReceivePolicyDecision>( decoder, this, &TestWithLegacyReceiver::didReceivePolicyDecision);105 return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidReceivePolicyDecision>(connection, decoder, this, &TestWithLegacyReceiver::didReceivePolicyDecision); 106 106 if (decoder.messageName() == Messages::TestWithLegacyReceiver::Close::name()) 107 return IPC::handleMessage<Messages::TestWithLegacyReceiver::Close>( decoder, this, &TestWithLegacyReceiver::close);107 return IPC::handleMessage<Messages::TestWithLegacyReceiver::Close>(connection, decoder, this, &TestWithLegacyReceiver::close); 108 108 if (decoder.messageName() == Messages::TestWithLegacyReceiver::PreferencesDidChange::name()) 109 return IPC::handleMessage<Messages::TestWithLegacyReceiver::PreferencesDidChange>( decoder, this, &TestWithLegacyReceiver::preferencesDidChange);109 return IPC::handleMessage<Messages::TestWithLegacyReceiver::PreferencesDidChange>(connection, decoder, this, &TestWithLegacyReceiver::preferencesDidChange); 110 110 if (decoder.messageName() == Messages::TestWithLegacyReceiver::SendDoubleAndFloat::name()) 111 return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendDoubleAndFloat>( decoder, this, &TestWithLegacyReceiver::sendDoubleAndFloat);111 return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendDoubleAndFloat>(connection, decoder, this, &TestWithLegacyReceiver::sendDoubleAndFloat); 112 112 if (decoder.messageName() == Messages::TestWithLegacyReceiver::SendInts::name()) 113 return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendInts>( decoder, this, &TestWithLegacyReceiver::sendInts);113 return IPC::handleMessage<Messages::TestWithLegacyReceiver::SendInts>(connection, decoder, this, &TestWithLegacyReceiver::sendInts); 114 114 if (decoder.messageName() == Messages::TestWithLegacyReceiver::TestParameterAttributes::name()) 115 return IPC::handleMessage<Messages::TestWithLegacyReceiver::TestParameterAttributes>( decoder, this, &TestWithLegacyReceiver::testParameterAttributes);115 return IPC::handleMessage<Messages::TestWithLegacyReceiver::TestParameterAttributes>(connection, decoder, this, &TestWithLegacyReceiver::testParameterAttributes); 116 116 if (decoder.messageName() == Messages::TestWithLegacyReceiver::TemplateTest::name()) 117 return IPC::handleMessage<Messages::TestWithLegacyReceiver::TemplateTest>( decoder, this, &TestWithLegacyReceiver::templateTest);117 return IPC::handleMessage<Messages::TestWithLegacyReceiver::TemplateTest>(connection, decoder, this, &TestWithLegacyReceiver::templateTest); 118 118 if (decoder.messageName() == Messages::TestWithLegacyReceiver::SetVideoLayerID::name()) 119 return IPC::handleMessage<Messages::TestWithLegacyReceiver::SetVideoLayerID>( decoder, this, &TestWithLegacyReceiver::setVideoLayerID);119 return IPC::handleMessage<Messages::TestWithLegacyReceiver::SetVideoLayerID>(connection, decoder, this, &TestWithLegacyReceiver::setVideoLayerID); 120 120 #if PLATFORM(MAC) 121 121 if (decoder.messageName() == Messages::TestWithLegacyReceiver::DidCreateWebProcessConnection::name()) 122 return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidCreateWebProcessConnection>( decoder, this, &TestWithLegacyReceiver::didCreateWebProcessConnection);122 return IPC::handleMessage<Messages::TestWithLegacyReceiver::DidCreateWebProcessConnection>(connection, decoder, this, &TestWithLegacyReceiver::didCreateWebProcessConnection); 123 123 #endif 124 124 #if ENABLE(DEPRECATED_FEATURE) 125 125 if (decoder.messageName() == Messages::TestWithLegacyReceiver::DeprecatedOperation::name()) 126 return IPC::handleMessage<Messages::TestWithLegacyReceiver::DeprecatedOperation>( decoder, this, &TestWithLegacyReceiver::deprecatedOperation);126 return IPC::handleMessage<Messages::TestWithLegacyReceiver::DeprecatedOperation>(connection, decoder, this, &TestWithLegacyReceiver::deprecatedOperation); 127 127 #endif 128 128 #if ENABLE(EXPERIMENTAL_FEATURE) 129 129 if (decoder.messageName() == Messages::TestWithLegacyReceiver::ExperimentalOperation::name()) 130 return IPC::handleMessage<Messages::TestWithLegacyReceiver::ExperimentalOperation>( decoder, this, &TestWithLegacyReceiver::experimentalOperation);130 return IPC::handleMessage<Messages::TestWithLegacyReceiver::ExperimentalOperation>(connection, decoder, this, &TestWithLegacyReceiver::experimentalOperation); 131 131 #endif 132 132 UNUSED_PARAM(connection); … … 143 143 auto protectedThis = makeRef(*this); 144 144 if (decoder.messageName() == Messages::TestWithLegacyReceiver::CreatePlugin::name()) 145 return IPC::handleMessage<Messages::TestWithLegacyReceiver::CreatePlugin>( decoder, *replyEncoder, this, &TestWithLegacyReceiver::createPlugin);145 return IPC::handleMessage<Messages::TestWithLegacyReceiver::CreatePlugin>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::createPlugin); 146 146 if (decoder.messageName() == Messages::TestWithLegacyReceiver::RunJavaScriptAlert::name()) 147 return IPC::handleMessage<Messages::TestWithLegacyReceiver::RunJavaScriptAlert>( decoder, *replyEncoder, this, &TestWithLegacyReceiver::runJavaScriptAlert);147 return IPC::handleMessage<Messages::TestWithLegacyReceiver::RunJavaScriptAlert>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::runJavaScriptAlert); 148 148 if (decoder.messageName() == Messages::TestWithLegacyReceiver::GetPlugins::name()) 149 return IPC::handleMessage<Messages::TestWithLegacyReceiver::GetPlugins>( decoder, *replyEncoder, this, &TestWithLegacyReceiver::getPlugins);149 return IPC::handleMessage<Messages::TestWithLegacyReceiver::GetPlugins>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::getPlugins); 150 150 if (decoder.messageName() == Messages::TestWithLegacyReceiver::GetPluginProcessConnection::name()) 151 151 return IPC::handleMessageSynchronous<Messages::TestWithLegacyReceiver::GetPluginProcessConnection>(connection, decoder, replyEncoder, this, &TestWithLegacyReceiver::getPluginProcessConnection); … … 154 154 #if PLATFORM(MAC) 155 155 if (decoder.messageName() == Messages::TestWithLegacyReceiver::InterpretKeyEvent::name()) 156 return IPC::handleMessage<Messages::TestWithLegacyReceiver::InterpretKeyEvent>( decoder, *replyEncoder, this, &TestWithLegacyReceiver::interpretKeyEvent);156 return IPC::handleMessage<Messages::TestWithLegacyReceiver::InterpretKeyEvent>(connection, decoder, *replyEncoder, this, &TestWithLegacyReceiver::interpretKeyEvent); 157 157 #endif 158 158 UNUSED_PARAM(connection); -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp
r279221 r282115 37 37 auto protectedThis = makeRef(*this); 38 38 if (decoder.messageName() == Messages::TestWithSemaphore::SendSemaphore::name()) 39 return IPC::handleMessage<Messages::TestWithSemaphore::SendSemaphore>( decoder, this, &TestWithSemaphore::sendSemaphore);39 return IPC::handleMessage<Messages::TestWithSemaphore::SendSemaphore>(connection, decoder, this, &TestWithSemaphore::sendSemaphore); 40 40 UNUSED_PARAM(connection); 41 41 UNUSED_PARAM(decoder); … … 51 51 auto protectedThis = makeRef(*this); 52 52 if (decoder.messageName() == Messages::TestWithSemaphore::ReceiveSemaphore::name()) 53 return IPC::handleMessage<Messages::TestWithSemaphore::ReceiveSemaphore>( decoder, *replyEncoder, this, &TestWithSemaphore::receiveSemaphore);53 return IPC::handleMessage<Messages::TestWithSemaphore::ReceiveSemaphore>(connection, decoder, *replyEncoder, this, &TestWithSemaphore::receiveSemaphore); 54 54 UNUSED_PARAM(connection); 55 55 UNUSED_PARAM(decoder); -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp
r279221 r282115 37 37 auto protectedThis = makeRef(*this); 38 38 if (decoder.messageName() == Messages::TestWithStreamBuffer::SendStreamBuffer::name()) 39 return IPC::handleMessage<Messages::TestWithStreamBuffer::SendStreamBuffer>( decoder, this, &TestWithStreamBuffer::sendStreamBuffer);39 return IPC::handleMessage<Messages::TestWithStreamBuffer::SendStreamBuffer>(connection, decoder, this, &TestWithStreamBuffer::sendStreamBuffer); 40 40 UNUSED_PARAM(connection); 41 41 UNUSED_PARAM(decoder); -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp
r279221 r282115 40 40 { 41 41 if (decoder.messageName() == Messages::TestWithStream::SendString::name()) 42 return IPC::handleMessage<Messages::TestWithStream::SendString>( decoder, this, &TestWithStream::sendString);42 return IPC::handleMessage<Messages::TestWithStream::SendString>(connection.connection(), decoder, this, &TestWithStream::sendString); 43 43 #if PLATFORM(COCOA) 44 44 if (decoder.messageName() == Messages::TestWithStream::SendMachSendRight::name()) 45 return IPC::handleMessage<Messages::TestWithStream::SendMachSendRight>( decoder, this, &TestWithStream::sendMachSendRight);45 return IPC::handleMessage<Messages::TestWithStream::SendMachSendRight>(connection.connection(), decoder, this, &TestWithStream::sendMachSendRight); 46 46 #endif 47 47 if (decoder.messageName() == Messages::TestWithStream::SendStringSynchronized::name()) 48 return IPC::handleMessage<Messages::TestWithStream::SendStringSynchronized>( decoder, this, &TestWithStream::sendStringSynchronized);48 return IPC::handleMessage<Messages::TestWithStream::SendStringSynchronized>(connection, decoder, this, &TestWithStream::sendStringSynchronized); 49 49 #if PLATFORM(COCOA) 50 50 if (decoder.messageName() == Messages::TestWithStream::ReceiveMachSendRight::name()) 51 return IPC::handleMessage<Messages::TestWithStream::ReceiveMachSendRight>( decoder, this, &TestWithStream::receiveMachSendRight);51 return IPC::handleMessage<Messages::TestWithStream::ReceiveMachSendRight>(connection, decoder, this, &TestWithStream::receiveMachSendRight); 52 52 #endif 53 53 #if PLATFORM(COCOA) 54 54 if (decoder.messageName() == Messages::TestWithStream::SendAndReceiveMachSendRight::name()) 55 return IPC::handleMessage<Messages::TestWithStream::SendAndReceiveMachSendRight>( decoder, this, &TestWithStream::sendAndReceiveMachSendRight);55 return IPC::handleMessage<Messages::TestWithStream::SendAndReceiveMachSendRight>(connection, decoder, this, &TestWithStream::sendAndReceiveMachSendRight); 56 56 #endif 57 57 UNUSED_PARAM(decoder); -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp
r279221 r282115 171 171 auto protectedThis = makeRef(*this); 172 172 if (decoder.messageName() == Messages::TestWithSuperclass::LoadURL::name()) 173 return IPC::handleMessage<Messages::TestWithSuperclass::LoadURL>( decoder, this, &TestWithSuperclass::loadURL);173 return IPC::handleMessage<Messages::TestWithSuperclass::LoadURL>(connection, decoder, this, &TestWithSuperclass::loadURL); 174 174 #if ENABLE(TEST_FEATURE) 175 175 if (decoder.messageName() == Messages::TestWithSuperclass::TestAsyncMessage::name()) -
trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp
r279221 r282115 85 85 auto protectedThis = makeRef(*this); 86 86 if (decoder.messageName() == Messages::TestWithoutAttributes::LoadURL::name()) 87 return IPC::handleMessage<Messages::TestWithoutAttributes::LoadURL>( decoder, this, &TestWithoutAttributes::loadURL);87 return IPC::handleMessage<Messages::TestWithoutAttributes::LoadURL>(connection, decoder, this, &TestWithoutAttributes::loadURL); 88 88 #if ENABLE(TOUCH_EVENTS) 89 89 if (decoder.messageName() == Messages::TestWithoutAttributes::LoadSomething::name()) 90 return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomething>( decoder, this, &TestWithoutAttributes::loadSomething);90 return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomething>(connection, decoder, this, &TestWithoutAttributes::loadSomething); 91 91 #endif 92 92 #if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION || SOME_OTHER_MESSAGE_CONDITION)) 93 93 if (decoder.messageName() == Messages::TestWithoutAttributes::TouchEvent::name()) 94 return IPC::handleMessage<Messages::TestWithoutAttributes::TouchEvent>( decoder, this, &TestWithoutAttributes::touchEvent);94 return IPC::handleMessage<Messages::TestWithoutAttributes::TouchEvent>(connection, decoder, this, &TestWithoutAttributes::touchEvent); 95 95 #endif 96 96 #if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION && SOME_OTHER_MESSAGE_CONDITION)) 97 97 if (decoder.messageName() == Messages::TestWithoutAttributes::AddEvent::name()) 98 return IPC::handleMessage<Messages::TestWithoutAttributes::AddEvent>( decoder, this, &TestWithoutAttributes::addEvent);98 return IPC::handleMessage<Messages::TestWithoutAttributes::AddEvent>(connection, decoder, this, &TestWithoutAttributes::addEvent); 99 99 #endif 100 100 #if ENABLE(TOUCH_EVENTS) 101 101 if (decoder.messageName() == Messages::TestWithoutAttributes::LoadSomethingElse::name()) 102 return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomethingElse>( decoder, this, &TestWithoutAttributes::loadSomethingElse);102 return IPC::handleMessage<Messages::TestWithoutAttributes::LoadSomethingElse>(connection, decoder, this, &TestWithoutAttributes::loadSomethingElse); 103 103 #endif 104 104 if (decoder.messageName() == Messages::TestWithoutAttributes::DidReceivePolicyDecision::name()) 105 return IPC::handleMessage<Messages::TestWithoutAttributes::DidReceivePolicyDecision>( decoder, this, &TestWithoutAttributes::didReceivePolicyDecision);105 return IPC::handleMessage<Messages::TestWithoutAttributes::DidReceivePolicyDecision>(connection, decoder, this, &TestWithoutAttributes::didReceivePolicyDecision); 106 106 if (decoder.messageName() == Messages::TestWithoutAttributes::Close::name()) 107 return IPC::handleMessage<Messages::TestWithoutAttributes::Close>( decoder, this, &TestWithoutAttributes::close);107 return IPC::handleMessage<Messages::TestWithoutAttributes::Close>(connection, decoder, this, &TestWithoutAttributes::close); 108 108 if (decoder.messageName() == Messages::TestWithoutAttributes::PreferencesDidChange::name()) 109 return IPC::handleMessage<Messages::TestWithoutAttributes::PreferencesDidChange>( decoder, this, &TestWithoutAttributes::preferencesDidChange);109 return IPC::handleMessage<Messages::TestWithoutAttributes::PreferencesDidChange>(connection, decoder, this, &TestWithoutAttributes::preferencesDidChange); 110 110 if (decoder.messageName() == Messages::TestWithoutAttributes::SendDoubleAndFloat::name()) 111 return IPC::handleMessage<Messages::TestWithoutAttributes::SendDoubleAndFloat>( decoder, this, &TestWithoutAttributes::sendDoubleAndFloat);111 return IPC::handleMessage<Messages::TestWithoutAttributes::SendDoubleAndFloat>(connection, decoder, this, &TestWithoutAttributes::sendDoubleAndFloat); 112 112 if (decoder.messageName() == Messages::TestWithoutAttributes::SendInts::name()) 113 return IPC::handleMessage<Messages::TestWithoutAttributes::SendInts>( decoder, this, &TestWithoutAttributes::sendInts);113 return IPC::handleMessage<Messages::TestWithoutAttributes::SendInts>(connection, decoder, this, &TestWithoutAttributes::sendInts); 114 114 if (decoder.messageName() == Messages::TestWithoutAttributes::TestParameterAttributes::name()) 115 return IPC::handleMessage<Messages::TestWithoutAttributes::TestParameterAttributes>( decoder, this, &TestWithoutAttributes::testParameterAttributes);115 return IPC::handleMessage<Messages::TestWithoutAttributes::TestParameterAttributes>(connection, decoder, this, &TestWithoutAttributes::testParameterAttributes); 116 116 if (decoder.messageName() == Messages::TestWithoutAttributes::TemplateTest::name()) 117 return IPC::handleMessage<Messages::TestWithoutAttributes::TemplateTest>( decoder, this, &TestWithoutAttributes::templateTest);117 return IPC::handleMessage<Messages::TestWithoutAttributes::TemplateTest>(connection, decoder, this, &TestWithoutAttributes::templateTest); 118 118 if (decoder.messageName() == Messages::TestWithoutAttributes::SetVideoLayerID::name()) 119 return IPC::handleMessage<Messages::TestWithoutAttributes::SetVideoLayerID>( decoder, this, &TestWithoutAttributes::setVideoLayerID);119 return IPC::handleMessage<Messages::TestWithoutAttributes::SetVideoLayerID>(connection, decoder, this, &TestWithoutAttributes::setVideoLayerID); 120 120 #if PLATFORM(MAC) 121 121 if (decoder.messageName() == Messages::TestWithoutAttributes::DidCreateWebProcessConnection::name()) 122 return IPC::handleMessage<Messages::TestWithoutAttributes::DidCreateWebProcessConnection>( decoder, this, &TestWithoutAttributes::didCreateWebProcessConnection);122 return IPC::handleMessage<Messages::TestWithoutAttributes::DidCreateWebProcessConnection>(connection, decoder, this, &TestWithoutAttributes::didCreateWebProcessConnection); 123 123 #endif 124 124 #if ENABLE(DEPRECATED_FEATURE) 125 125 if (decoder.messageName() == Messages::TestWithoutAttributes::DeprecatedOperation::name()) 126 return IPC::handleMessage<Messages::TestWithoutAttributes::DeprecatedOperation>( decoder, this, &TestWithoutAttributes::deprecatedOperation);126 return IPC::handleMessage<Messages::TestWithoutAttributes::DeprecatedOperation>(connection, decoder, this, &TestWithoutAttributes::deprecatedOperation); 127 127 #endif 128 128 #if ENABLE(EXPERIMENTAL_FEATURE) 129 129 if (decoder.messageName() == Messages::TestWithoutAttributes::ExperimentalOperation::name()) 130 return IPC::handleMessage<Messages::TestWithoutAttributes::ExperimentalOperation>( decoder, this, &TestWithoutAttributes::experimentalOperation);130 return IPC::handleMessage<Messages::TestWithoutAttributes::ExperimentalOperation>(connection, decoder, this, &TestWithoutAttributes::experimentalOperation); 131 131 #endif 132 132 UNUSED_PARAM(connection); … … 143 143 auto protectedThis = makeRef(*this); 144 144 if (decoder.messageName() == Messages::TestWithoutAttributes::CreatePlugin::name()) 145 return IPC::handleMessage<Messages::TestWithoutAttributes::CreatePlugin>( decoder, *replyEncoder, this, &TestWithoutAttributes::createPlugin);145 return IPC::handleMessage<Messages::TestWithoutAttributes::CreatePlugin>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::createPlugin); 146 146 if (decoder.messageName() == Messages::TestWithoutAttributes::RunJavaScriptAlert::name()) 147 return IPC::handleMessage<Messages::TestWithoutAttributes::RunJavaScriptAlert>( decoder, *replyEncoder, this, &TestWithoutAttributes::runJavaScriptAlert);147 return IPC::handleMessage<Messages::TestWithoutAttributes::RunJavaScriptAlert>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::runJavaScriptAlert); 148 148 if (decoder.messageName() == Messages::TestWithoutAttributes::GetPlugins::name()) 149 return IPC::handleMessage<Messages::TestWithoutAttributes::GetPlugins>( decoder, *replyEncoder, this, &TestWithoutAttributes::getPlugins);149 return IPC::handleMessage<Messages::TestWithoutAttributes::GetPlugins>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::getPlugins); 150 150 if (decoder.messageName() == Messages::TestWithoutAttributes::GetPluginProcessConnection::name()) 151 151 return IPC::handleMessageSynchronous<Messages::TestWithoutAttributes::GetPluginProcessConnection>(connection, decoder, replyEncoder, this, &TestWithoutAttributes::getPluginProcessConnection); … … 154 154 #if PLATFORM(MAC) 155 155 if (decoder.messageName() == Messages::TestWithoutAttributes::InterpretKeyEvent::name()) 156 return IPC::handleMessage<Messages::TestWithoutAttributes::InterpretKeyEvent>( decoder, *replyEncoder, this, &TestWithoutAttributes::interpretKeyEvent);156 return IPC::handleMessage<Messages::TestWithoutAttributes::InterpretKeyEvent>(connection, decoder, *replyEncoder, this, &TestWithoutAttributes::interpretKeyEvent); 157 157 #endif 158 158 UNUSED_PARAM(connection); -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
r281964 r282115 483 483 #if PLATFORM(COCOA) 484 484 if (decoder.messageName() == Messages::WebPageProxy::RegisterWebProcessAccessibilityToken::name()) { 485 IPC::handleMessage<Messages::WebPageProxy::RegisterWebProcessAccessibilityToken>( decoder, this, &ProvisionalPageProxy::registerWebProcessAccessibilityToken);485 IPC::handleMessage<Messages::WebPageProxy::RegisterWebProcessAccessibilityToken>(connection, decoder, this, &ProvisionalPageProxy::registerWebProcessAccessibilityToken); 486 486 return; 487 487 } … … 490 490 #if PLATFORM(GTK) || PLATFORM(WPE) 491 491 if (decoder.messageName() == Messages::WebPageProxy::BindAccessibilityTree::name()) { 492 IPC::handleMessage<Messages::WebPageProxy::BindAccessibilityTree>( decoder, this, &ProvisionalPageProxy::bindAccessibilityTree);492 IPC::handleMessage<Messages::WebPageProxy::BindAccessibilityTree>(connection, decoder, this, &ProvisionalPageProxy::bindAccessibilityTree); 493 493 return; 494 494 } … … 496 496 497 497 if (decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessageFromWebProcess::name()) { 498 IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageFromWebProcess>( decoder, this, &ProvisionalPageProxy::logDiagnosticMessageFromWebProcess);498 IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageFromWebProcess>(connection, decoder, this, &ProvisionalPageProxy::logDiagnosticMessageFromWebProcess); 499 499 return; 500 500 } 501 501 502 502 if (decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacyFromWebProcess::name()) { 503 IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacyFromWebProcess>( decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess);503 IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacyFromWebProcess>(connection, decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess); 504 504 return; 505 505 } 506 506 507 507 if (decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessageWithValueDictionaryFromWebProcess::name()) { 508 IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithValueDictionaryFromWebProcess>( decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess);508 IPC::handleMessage<Messages::WebPageProxy::LogDiagnosticMessageWithValueDictionaryFromWebProcess>(connection, decoder, this, &ProvisionalPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess); 509 509 return; 510 510 } 511 511 512 512 if (decoder.messageName() == Messages::WebPageProxy::StartURLSchemeTask::name()) { 513 IPC::handleMessage<Messages::WebPageProxy::StartURLSchemeTask>( decoder, this, &ProvisionalPageProxy::startURLSchemeTask);513 IPC::handleMessage<Messages::WebPageProxy::StartURLSchemeTask>(connection, decoder, this, &ProvisionalPageProxy::startURLSchemeTask); 514 514 return; 515 515 } 516 516 517 517 if (decoder.messageName() == Messages::WebPageProxy::DecidePolicyForNavigationActionAsync::name()) { 518 IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForNavigationActionAsync>( decoder, this, &ProvisionalPageProxy::decidePolicyForNavigationActionAsync);518 IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForNavigationActionAsync>(connection, decoder, this, &ProvisionalPageProxy::decidePolicyForNavigationActionAsync); 519 519 return; 520 520 } 521 521 522 522 if (decoder.messageName() == Messages::WebPageProxy::DecidePolicyForResponse::name()) { 523 IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForResponse>( decoder, this, &ProvisionalPageProxy::decidePolicyForResponse);523 IPC::handleMessage<Messages::WebPageProxy::DecidePolicyForResponse>(connection, decoder, this, &ProvisionalPageProxy::decidePolicyForResponse); 524 524 return; 525 525 } 526 526 527 527 if (decoder.messageName() == Messages::WebPageProxy::DidChangeProvisionalURLForFrame::name()) { 528 IPC::handleMessage<Messages::WebPageProxy::DidChangeProvisionalURLForFrame>( decoder, this, &ProvisionalPageProxy::didChangeProvisionalURLForFrame);528 IPC::handleMessage<Messages::WebPageProxy::DidChangeProvisionalURLForFrame>(connection, decoder, this, &ProvisionalPageProxy::didChangeProvisionalURLForFrame); 529 529 return; 530 530 } 531 531 532 532 if (decoder.messageName() == Messages::WebPageProxy::DidNavigateWithNavigationData::name()) { 533 IPC::handleMessage<Messages::WebPageProxy::DidNavigateWithNavigationData>( decoder, this, &ProvisionalPageProxy::didNavigateWithNavigationData);533 IPC::handleMessage<Messages::WebPageProxy::DidNavigateWithNavigationData>(connection, decoder, this, &ProvisionalPageProxy::didNavigateWithNavigationData); 534 534 return; 535 535 } 536 536 537 537 if (decoder.messageName() == Messages::WebPageProxy::DidPerformClientRedirect::name()) { 538 IPC::handleMessage<Messages::WebPageProxy::DidPerformClientRedirect>( decoder, this, &ProvisionalPageProxy::didPerformClientRedirect);538 IPC::handleMessage<Messages::WebPageProxy::DidPerformClientRedirect>(connection, decoder, this, &ProvisionalPageProxy::didPerformClientRedirect); 539 539 return; 540 540 } 541 541 542 542 if (decoder.messageName() == Messages::WebPageProxy::DidCreateMainFrame::name()) { 543 IPC::handleMessage<Messages::WebPageProxy::DidCreateMainFrame>( decoder, this, &ProvisionalPageProxy::didCreateMainFrame);543 IPC::handleMessage<Messages::WebPageProxy::DidCreateMainFrame>(connection, decoder, this, &ProvisionalPageProxy::didCreateMainFrame); 544 544 return; 545 545 } 546 546 547 547 if (decoder.messageName() == Messages::WebPageProxy::DidStartProvisionalLoadForFrame::name()) { 548 IPC::handleMessage<Messages::WebPageProxy::DidStartProvisionalLoadForFrame>( decoder, this, &ProvisionalPageProxy::didStartProvisionalLoadForFrame);548 IPC::handleMessage<Messages::WebPageProxy::DidStartProvisionalLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didStartProvisionalLoadForFrame); 549 549 return; 550 550 } 551 551 552 552 if (decoder.messageName() == Messages::WebPageProxy::DidFailProvisionalLoadForFrame::name()) { 553 IPC::handleMessage<Messages::WebPageProxy::DidFailProvisionalLoadForFrame>( decoder, this, &ProvisionalPageProxy::didFailProvisionalLoadForFrame);553 IPC::handleMessage<Messages::WebPageProxy::DidFailProvisionalLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didFailProvisionalLoadForFrame); 554 554 return; 555 555 } 556 556 557 557 if (decoder.messageName() == Messages::WebPageProxy::DidCommitLoadForFrame::name()) { 558 IPC::handleMessage<Messages::WebPageProxy::DidCommitLoadForFrame>( decoder, this, &ProvisionalPageProxy::didCommitLoadForFrame);558 IPC::handleMessage<Messages::WebPageProxy::DidCommitLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didCommitLoadForFrame); 559 559 return; 560 560 } 561 561 562 562 if (decoder.messageName() == Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame::name()) { 563 IPC::handleMessage<Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame>( decoder, this, &ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame);563 IPC::handleMessage<Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame); 564 564 return; 565 565 } 566 566 567 567 if (decoder.messageName() == Messages::WebPageProxy::DidPerformServerRedirect::name()) { 568 IPC::handleMessage<Messages::WebPageProxy::DidPerformServerRedirect>( decoder, this, &ProvisionalPageProxy::didPerformServerRedirect);568 IPC::handleMessage<Messages::WebPageProxy::DidPerformServerRedirect>(connection, decoder, this, &ProvisionalPageProxy::didPerformServerRedirect); 569 569 return; 570 570 } … … 579 579 #if ENABLE(CONTENT_FILTERING) 580 580 if (decoder.messageName() == Messages::WebPageProxy::ContentFilterDidBlockLoadForFrame::name()) { 581 IPC::handleMessage<Messages::WebPageProxy::ContentFilterDidBlockLoadForFrame>( decoder, this, &ProvisionalPageProxy::contentFilterDidBlockLoadForFrame);581 IPC::handleMessage<Messages::WebPageProxy::ContentFilterDidBlockLoadForFrame>(connection, decoder, this, &ProvisionalPageProxy::contentFilterDidBlockLoadForFrame); 582 582 return; 583 583 } … … 586 586 #if HAVE(VISIBILITY_PROPAGATION_VIEW) 587 587 if (decoder.messageName() == Messages::WebPageProxy::DidCreateContextInWebProcessForVisibilityPropagation::name()) { 588 IPC::handleMessage<Messages::WebPageProxy::DidCreateContextInWebProcessForVisibilityPropagation>( decoder, this, &ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation);588 IPC::handleMessage<Messages::WebPageProxy::DidCreateContextInWebProcessForVisibilityPropagation>(connection, decoder, this, &ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation); 589 589 return; 590 590 }
Note:
See TracChangeset
for help on using the changeset viewer.