Changeset 86812 in webkit
- Timestamp:
- May 18, 2011 6:36:41 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r86806 r86812 1 2011-05-18 Darin Adler <darin@apple.com> 2 3 Reviewed by Anders Carlsson. 4 5 [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails 6 https://bugs.webkit.org/show_bug.cgi?id=60872 7 8 Eliminate the concept of SyncReplyMode and instead hand around ownership 9 of the reply decoder using an OwnPtr. 10 11 * Platform/CoreIPC/Connection.cpp: 12 (CoreIPC::Connection::dispatchSyncMessage): Eliminated comments that say 13 the same things the code itself does. Removed code that handles the 14 reply mode. Instead, pass the OwnPtr to the message handling function and 15 make the call to sendSyncReply conditional on whether the reply encoder 16 is still non-null. 17 18 * Platform/CoreIPC/Connection.h: Removed SyncReplyMode. Made 19 didReceiveSyncMessage return void, and take OwnPtr<ArgumentEncoder>& for 20 the reply encoder. 21 22 * Platform/CoreIPC/HandleMessage.h: 23 (CoreIPC::handleMessageDelayed): Take an OwnPtr&. Replaced the call to 24 adoptPtr with a call to release. 25 26 * PluginProcess/PluginControllerProxy.h: Updated to take an OwnPtr& and 27 not return SyncReplyMode. 28 * PluginProcess/WebProcessConnection.cpp: 29 (WebKit::WebProcessConnection::didReceiveSyncMessage): Ditto. 30 * PluginProcess/WebProcessConnection.h: Ditto. 31 32 * Scripts/webkit2/messages.py: Updated for changes to sync messages. 33 Eliminated unneeded return types and use get() when apporopriate to call 34 the handleMessage functions. 35 36 * Scripts/webkit2/messages_unittest.py: Tried to update this too. 37 I don't know how to run the test, though. 38 39 * Shared/Plugins/NPObjectMessageReceiver.h: Updated to take an OwnPtr& and 40 not return SyncReplyMode. 41 * Shared/Plugins/NPRemoteObjectMap.cpp: 42 (WebKit::NPRemoteObjectMap::didReceiveSyncMessage): Ditto. 43 * Shared/Plugins/NPRemoteObjectMap.h: Ditto. 44 * UIProcess/Downloads/DownloadProxy.h: Ditto. 45 * UIProcess/WebContext.cpp: 46 (WebKit::WebContext::didReceiveSyncMessage): Ditto. 47 * UIProcess/WebContext.h: Ditto. 48 * UIProcess/WebFullScreenManagerProxy.cpp: 49 (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage): Ditto. 50 * UIProcess/WebFullScreenManagerProxy.h: Ditto. 51 * UIProcess/WebIconDatabase.cpp: 52 (WebKit::WebIconDatabase::didReceiveSyncMessage): Ditto. 53 * UIProcess/WebIconDatabase.h: Ditto. 54 * UIProcess/WebInspectorProxy.h: Ditto. 55 * UIProcess/WebPageProxy.cpp: 56 (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto. 57 * UIProcess/WebPageProxy.h: Ditto. 58 * UIProcess/WebProcessProxy.cpp: 59 (WebKit::WebProcessProxy::didReceiveSyncMessage): Ditto. 60 * UIProcess/WebProcessProxy.h: Ditto. 61 62 * WebProcess/Plugins/Netscape/JSNPObject.cpp: Added a missing include. 63 64 * WebProcess/Plugins/PluginProcessConnection.cpp: 65 (WebKit::PluginProcessConnection::didReceiveSyncMessage): Updated to take 66 an OwnPtr& and not return SyncReplyMode. 67 * WebProcess/Plugins/PluginProcessConnection.h: Ditto. 68 * WebProcess/Plugins/PluginProxy.h: Ditto. 69 * WebProcess/WebPage/WebPage.cpp: 70 (WebKit::WebPage::didReceiveSyncMessage): Ditto. 71 * WebProcess/WebPage/WebPage.h: Ditto. 72 * WebProcess/WebProcess.cpp: 73 (WebKit::WebProcess::didReceiveSyncMessage): Ditto. 74 * WebProcess/WebProcess.h: Ditto. 75 1 76 2011-05-18 Chris Fleizach <cfleizach@apple.com> 2 77 -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp
r86175 r86812 620 620 ASSERT(messageID.isSync()); 621 621 622 // Decode the sync request ID.623 622 uint64_t syncRequestID = 0; 624 625 623 if (!arguments->decodeUInt64(syncRequestID) || !syncRequestID) { 626 624 // We received an invalid sync message. … … 629 627 } 630 628 631 // Create our reply encoder.632 629 OwnPtr<ArgumentEncoder> replyEncoder = ArgumentEncoder::create(syncRequestID); 633 630 634 631 // Hand off both the decoder and encoder to the client. 635 SyncReplyMode syncReplyMode = m_client->didReceiveSyncMessage(this, messageID, arguments, replyEncoder.get());632 m_client->didReceiveSyncMessage(this, messageID, arguments, replyEncoder); 636 633 637 634 // FIXME: If the message was invalid, we should send back a SyncMessageError. 638 635 ASSERT(!arguments->isInvalid()); 639 636 640 if (syncReplyMode == ManualReply) { 641 // The client will take ownership of the reply encoder and send it at some point in the future. 642 ArgumentEncoder *encoder = replyEncoder.leakPtr(); 643 (void)encoder; 644 645 return; 646 } 647 648 // Send the reply. 649 sendSyncReply(replyEncoder.release()); 637 if (replyEncoder) 638 sendSyncReply(replyEncoder.release()); 650 639 } 651 640 -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.h
r86585 r86812 57 57 class MessageID; 58 58 59 enum SyncReplyMode {60 AutomaticReply,61 ManualReply62 };63 64 59 enum MessageSendFlags { 65 60 // Whether this message should be dispatched when waiting for a sync reply. … … 81 76 public: 82 77 virtual void didReceiveMessage(Connection*, MessageID, ArgumentDecoder*) = 0; 83 virtual SyncReplyMode didReceiveSyncMessage(Connection*, MessageID, ArgumentDecoder*, ArgumentEncoder*) { ASSERT_NOT_REACHED(); return AutomaticReply; }78 virtual void didReceiveSyncMessage(Connection*, MessageID, ArgumentDecoder*, OwnPtr<ArgumentEncoder>&) { ASSERT_NOT_REACHED(); } 84 79 85 80 protected: -
trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h
r86477 r86812 313 313 314 314 template<typename T, typename C, typename MF> 315 void handleMessageDelayed(Connection* connection, ArgumentDecoder* argumentDecoder, ArgumentEncoder*replyEncoder, C* object, MF function)316 { 317 typename T::DecodeType::ValueType arguments; 318 if (!argumentDecoder->decode(arguments)) 319 return; 320 321 RefPtr<typename T::DelayedReply> delayedReply = adoptRef(new typename T::DelayedReply(connection, adoptPtr(replyEncoder)));315 void handleMessageDelayed(Connection* connection, ArgumentDecoder* argumentDecoder, OwnPtr<ArgumentEncoder>& replyEncoder, C* object, MF function) 316 { 317 typename T::DecodeType::ValueType arguments; 318 if (!argumentDecoder->decode(arguments)) 319 return; 320 321 RefPtr<typename T::DelayedReply> delayedReply = adoptRef(new typename T::DelayedReply(connection, replyEncoder.release())); 322 322 callMemberFunction(arguments, delayedReply.release(), object, function); 323 323 } -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h
r86578 r86812 66 66 67 67 void didReceivePluginControllerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 68 CoreIPC::SyncReplyMode didReceiveSyncPluginControllerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);68 void didReceiveSyncPluginControllerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 69 69 70 70 #if PLATFORM(MAC) -
trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp
r86522 r86812 115 115 } 116 116 117 CoreIPC::SyncReplyMode WebProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)117 void WebProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 118 118 { 119 119 uint64_t destinationID = arguments->destinationID(); 120 120 121 if (!destinationID) 122 return didReceiveSyncWebProcessConnectionMessage(connection, messageID, arguments, reply); 121 if (!destinationID) { 122 didReceiveSyncWebProcessConnectionMessage(connection, messageID, arguments, reply); 123 return; 124 } 123 125 124 if (messageID.is<CoreIPC::MessageClassNPObjectMessageReceiver>()) 125 return m_npRemoteObjectMap->didReceiveSyncMessage(connection, messageID, arguments, reply); 126 if (messageID.is<CoreIPC::MessageClassNPObjectMessageReceiver>()) { 127 m_npRemoteObjectMap->didReceiveSyncMessage(connection, messageID, arguments, reply); 128 return; 129 } 126 130 127 131 PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(arguments->destinationID()); 128 132 if (!pluginControllerProxy) 129 return CoreIPC::AutomaticReply;133 return; 130 134 131 135 PluginController::PluginDestructionProtector protector(pluginControllerProxy->asPluginController()); 132 CoreIPC::SyncReplyMode replyMode = pluginControllerProxy->didReceiveSyncPluginControllerProxyMessage(connection, messageID, arguments, reply); 133 134 return replyMode; 136 pluginControllerProxy->didReceiveSyncPluginControllerProxyMessage(connection, messageID, arguments, reply); 135 137 } 136 138 -
trunk/Source/WebKit2/PluginProcess/WebProcessConnection.h
r86489 r86812 60 60 // CoreIPC::Connection::Client 61 61 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 62 virtual CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);62 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 63 63 virtual void didClose(CoreIPC::Connection*); 64 64 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID); … … 66 66 67 67 // Message handlers. 68 CoreIPC::SyncReplyMode didReceiveSyncWebProcessConnectionMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);68 void didReceiveSyncWebProcessConnectionMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 69 69 void createPlugin(const PluginCreationParameters&, bool& result, uint32_t& remoteLayerClientID); 70 70 void destroyPlugin(uint64_t pluginInstanceID); -
trunk/Source/WebKit2/Scripts/webkit2/messages.py
r86489 r86812 402 402 result = [] 403 403 result.append(' case Messages::%s::%s:\n' % (receiver.name, message.id())) 404 result.append(' CoreIPC::%s<Messages::%s::%s>(%sarguments, reply, this, &%s);\n' % (dispatch_function, receiver.name, message.name, 'connection, ' if message.is_delayed else '', handler_function(receiver, message))) 405 406 if message.is_delayed: 407 result.append(' return CoreIPC::ManualReply;\n') 408 else: 409 result.append(' return CoreIPC::AutomaticReply;\n') 404 result.append(' CoreIPC::%s<Messages::%s::%s>(%sarguments, reply%s, this, &%s);\n' % (dispatch_function, receiver.name, message.name, 'connection, ' if message.is_delayed else '', '' if message.is_delayed else '.get()', handler_function(receiver, message))) 405 result.append(' return;\n') 410 406 411 407 return surround_in_condition(''.join(result), message.condition) … … 623 619 if sync_messages: 624 620 result.append('\n') 625 result.append(' CoreIPC::SyncReplyMode %s::didReceiveSync%sMessage(CoreIPC::Connection*%s, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)\n' % (receiver.name, receiver.name, ' connection' if sync_delayed_messages else ''))621 result.append('void %s::didReceiveSync%sMessage(CoreIPC::Connection*%s, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply)\n' % (receiver.name, receiver.name, ' connection' if sync_delayed_messages else '')) 626 622 result.append('{\n') 627 623 result.append(' switch (messageID.get<Messages::%s::Kind>()) {\n' % receiver.name) … … 631 627 result.append(' }\n\n') 632 628 result.append(' ASSERT_NOT_REACHED();\n') 633 result.append(' return CoreIPC::AutomaticReply;\n')634 629 result.append('}\n') 635 630 -
trunk/Source/WebKit2/Scripts/webkit2/messages_unittest.py
r85571 r86812 657 657 } 658 658 659 CoreIPC::SyncReplyMode WebPage::didReceiveSyncWebPageMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)659 void WebPage::didReceiveSyncWebPageMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 660 660 { 661 661 switch (messageID.get<Messages::WebPage::Kind>()) { 662 662 case Messages::WebPage::CreatePluginID: 663 CoreIPC::handleMessage<Messages::WebPage::CreatePlugin>(arguments, reply , this, &WebPage::createPlugin);663 CoreIPC::handleMessage<Messages::WebPage::CreatePlugin>(arguments, reply.get(), this, &WebPage::createPlugin); 664 664 return CoreIPC::AutomaticReply; 665 665 case Messages::WebPage::RunJavaScriptAlertID: 666 CoreIPC::handleMessage<Messages::WebPage::RunJavaScriptAlert>(arguments, reply , this, &WebPage::runJavaScriptAlert);666 CoreIPC::handleMessage<Messages::WebPage::RunJavaScriptAlert>(arguments, reply.get(), this, &WebPage::runJavaScriptAlert); 667 667 return CoreIPC::AutomaticReply; 668 668 case Messages::WebPage::GetPluginProcessConnectionID: 669 CoreIPC::handleMessageDelayed<Messages::WebPage::GetPluginProcessConnection>(connection, arguments, reply , this, &WebPage::getPluginProcessConnection);669 CoreIPC::handleMessageDelayed<Messages::WebPage::GetPluginProcessConnection>(connection, arguments, reply.release(), this, &WebPage::getPluginProcessConnection); 670 670 return CoreIPC::ManualReply; 671 671 #if PLATFORM(MAC) 672 672 case Messages::WebPage::InterpretKeyEventID: 673 CoreIPC::handleMessage<Messages::WebPage::InterpretKeyEvent>(arguments, reply , this, &WebPage::interpretKeyEvent);673 CoreIPC::handleMessage<Messages::WebPage::InterpretKeyEvent>(arguments, reply.get(), this, &WebPage::interpretKeyEvent); 674 674 return CoreIPC::AutomaticReply; 675 675 #endif -
trunk/Source/WebKit2/Shared/Plugins/NPObjectMessageReceiver.h
r81370 r86812 48 48 ~NPObjectMessageReceiver(); 49 49 50 CoreIPC::SyncReplyMode didReceiveSyncNPObjectMessageReceiverMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);50 void didReceiveSyncNPObjectMessageReceiverMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 51 51 52 52 Plugin* plugin() const { return m_plugin; } -
trunk/Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp
r81370 r86812 220 220 } 221 221 222 CoreIPC::SyncReplyMode NPRemoteObjectMap::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)222 void NPRemoteObjectMap::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 223 223 { 224 224 NPObjectMessageReceiver* messageReceiver = m_registeredNPObjects.get(arguments->destinationID()); 225 225 if (!messageReceiver) 226 return CoreIPC::AutomaticReply;227 228 returnmessageReceiver->didReceiveSyncNPObjectMessageReceiverMessage(connection, messageID, arguments, reply);226 return; 227 228 messageReceiver->didReceiveSyncNPObjectMessageReceiverMessage(connection, messageID, arguments, reply); 229 229 } 230 230 -
trunk/Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.h
r81370 r86812 65 65 void pluginDestroyed(Plugin*); 66 66 67 CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply);67 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply); 68 68 69 69 private: -
trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h
r82364 r86812 62 62 63 63 void didReceiveDownloadProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 64 CoreIPC::SyncReplyMode didReceiveSyncDownloadProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);64 void didReceiveSyncDownloadProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 65 65 66 66 private: -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r85983 r86812 648 648 } 649 649 650 CoreIPC::SyncReplyMode WebContext::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder* reply) 651 { 652 if (messageID.is<CoreIPC::MessageClassWebContext>()) 653 return didReceiveSyncWebContextMessage(connection, messageID, arguments, reply); 650 void WebContext::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 651 { 652 if (messageID.is<CoreIPC::MessageClassWebContext>()) { 653 didReceiveSyncWebContextMessage(connection, messageID, arguments, reply); 654 return; 655 } 654 656 655 657 if (messageID.is<CoreIPC::MessageClassDownloadProxy>()) { 656 658 if (DownloadProxy* downloadProxy = m_downloads.get(arguments->destinationID()).get()) 657 return downloadProxy->didReceiveSyncDownloadProxyMessage(connection, messageID, arguments, reply); 658 659 return CoreIPC::AutomaticReply; 660 } 661 662 if (messageID.is<CoreIPC::MessageClassWebIconDatabase>()) 663 return m_iconDatabase->didReceiveSyncMessage(connection, messageID, arguments, reply); 659 downloadProxy->didReceiveSyncDownloadProxyMessage(connection, messageID, arguments, reply); 660 return; 661 } 662 663 if (messageID.is<CoreIPC::MessageClassWebIconDatabase>()) { 664 m_iconDatabase->didReceiveSyncMessage(connection, messageID, arguments, reply); 665 return; 666 } 664 667 665 668 switch (messageID.get<WebContextLegacyMessage::Kind>()) { … … 671 674 WebContextUserMessageDecoder messageDecoder(messageBody, this); 672 675 if (!arguments->decode(CoreIPC::Out(messageName, messageDecoder))) 673 return CoreIPC::AutomaticReply;676 return; 674 677 675 678 RefPtr<APIObject> returnData; 676 679 didReceiveSynchronousMessageFromInjectedBundle(messageName, messageBody.get(), returnData); 677 680 reply->encode(CoreIPC::In(WebContextUserMessageEncoder(returnData.get()))); 678 return CoreIPC::AutomaticReply;681 return; 679 682 } 680 683 case WebContextLegacyMessage::PostMessage: 681 684 ASSERT_NOT_REACHED(); 682 685 } 683 684 return CoreIPC::AutomaticReply;685 686 } 686 687 -
trunk/Source/WebKit2/UIProcess/WebContext.h
r85983 r86812 119 119 120 120 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 121 CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);121 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 122 122 123 123 void setCacheModel(CacheModel); … … 200 200 // Implemented in generated WebContextMessageReceiver.cpp 201 201 void didReceiveWebContextMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 202 CoreIPC::SyncReplyMode didReceiveSyncWebContextMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);202 void didReceiveSyncWebContextMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 203 203 204 204 static void languageChanged(void* context); -
trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp
r82906 r86812 65 65 } 66 66 67 CoreIPC::SyncReplyMode WebFullScreenManagerProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)67 void WebFullScreenManagerProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 68 68 { 69 returndidReceiveSyncWebFullScreenManagerProxyMessage(connection, messageID, arguments, reply);69 didReceiveSyncWebFullScreenManagerProxyMessage(connection, messageID, arguments, reply); 70 70 } 71 71 -
trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h
r82084 r86812 74 74 75 75 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 76 CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply);76 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply); 77 77 78 78 void willEnterFullScreen(); … … 101 101 102 102 void didReceiveWebFullScreenManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 103 CoreIPC::SyncReplyMode didReceiveSyncWebFullScreenManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply);103 void didReceiveSyncWebFullScreenManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply); 104 104 }; 105 105 -
trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp
r83193 r86812 265 265 } 266 266 267 CoreIPC::SyncReplyMode WebIconDatabase::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* decoder, CoreIPC::ArgumentEncoder*reply)268 { 269 returndidReceiveSyncWebIconDatabaseMessage(connection, messageID, decoder, reply);267 void WebIconDatabase::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* decoder, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 268 { 269 didReceiveSyncWebIconDatabaseMessage(connection, messageID, decoder, reply); 270 270 } 271 271 -
trunk/Source/WebKit2/UIProcess/WebIconDatabase.h
r83193 r86812 94 94 95 95 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 96 CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);96 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 97 97 98 98 private: … … 102 102 103 103 void didReceiveWebIconDatabaseMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 104 CoreIPC::SyncReplyMode didReceiveSyncWebIconDatabaseMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);104 void didReceiveSyncWebIconDatabaseMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 105 105 106 106 WebContext* m_webContext; -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h
r86459 r86812 104 104 // Implemented in generated WebInspectorProxyMessageReceiver.cpp 105 105 void didReceiveWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 106 CoreIPC::SyncReplyMode didReceiveSyncWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);106 void didReceiveSyncWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 107 107 #endif 108 108 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r86645 r86812 1368 1368 } 1369 1369 1370 void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)1370 void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 1371 1371 { 1372 1372 #if ENABLE(INSPECTOR) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r86806 r86812 438 438 #endif 439 439 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 440 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);440 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 441 441 442 442 void processDidBecomeUnresponsive(); … … 544 544 // Implemented in generated WebPageProxyMessageReceiver.cpp 545 545 void didReceiveWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 546 CoreIPC::SyncReplyMode didReceiveSyncWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);546 void didReceiveSyncWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 547 547 548 548 void didCreateMainFrame(uint64_t frameID); -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r84434 r86812 261 261 } 262 262 263 CoreIPC::SyncReplyMode WebProcessProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder* reply) 264 { 265 if (messageID.is<CoreIPC::MessageClassWebProcessProxy>()) 266 return didReceiveSyncWebProcessProxyMessage(connection, messageID, arguments, reply); 263 void WebProcessProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 264 { 265 if (messageID.is<CoreIPC::MessageClassWebProcessProxy>()) { 266 didReceiveSyncWebProcessProxyMessage(connection, messageID, arguments, reply); 267 return; 268 } 267 269 268 270 if (messageID.is<CoreIPC::MessageClassWebContext>() || messageID.is<CoreIPC::MessageClassWebContextLegacy>() 269 || messageID.is<CoreIPC::MessageClassDownloadProxy>() || messageID.is<CoreIPC::MessageClassWebIconDatabase>()) 270 return m_context->didReceiveSyncMessage(connection, messageID, arguments, reply); 271 || messageID.is<CoreIPC::MessageClassDownloadProxy>() || messageID.is<CoreIPC::MessageClassWebIconDatabase>()) { 272 m_context->didReceiveSyncMessage(connection, messageID, arguments, reply); 273 } 271 274 272 275 uint64_t pageID = arguments->destinationID(); 273 276 if (!pageID) 274 return CoreIPC::AutomaticReply;277 return; 275 278 276 279 WebPageProxy* pageProxy = webPage(pageID); 277 280 if (!pageProxy) 278 return CoreIPC::AutomaticReply;281 return; 279 282 280 283 pageProxy->didReceiveSyncMessage(connection, messageID, arguments, reply); 281 return CoreIPC::AutomaticReply;282 284 } 283 285 -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.h
r86692 r86812 139 139 // CoreIPC::Connection::Client 140 140 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 141 virtual CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);141 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 142 142 virtual void didClose(CoreIPC::Connection*); 143 143 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID); … … 162 162 // Implemented in generated WebProcessProxyMessageReceiver.cpp 163 163 void didReceiveWebProcessProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 164 CoreIPC::SyncReplyMode didReceiveSyncWebProcessProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply);164 void didReceiveSyncWebProcessProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply); 165 165 166 166 ResponsivenessTimer m_responsivenessTimer; -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp
r86499 r86812 36 36 #include <JavaScriptCore/ObjectPrototype.h> 37 37 #include <WebCore/IdentifierRep.h> 38 #include <wtf/Assertions.h> 38 39 #include <wtf/text/WTFString.h> 39 40 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp
r84302 r86812 110 110 } 111 111 112 CoreIPC::SyncReplyMode PluginProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)112 void PluginProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 113 113 { 114 if (messageID.is<CoreIPC::MessageClassNPObjectMessageReceiver>()) 115 return m_npRemoteObjectMap->didReceiveSyncMessage(connection, messageID, arguments, reply); 114 if (messageID.is<CoreIPC::MessageClassNPObjectMessageReceiver>()) { 115 m_npRemoteObjectMap->didReceiveSyncMessage(connection, messageID, arguments, reply); 116 return; 117 } 116 118 117 if (PluginProxy* pluginProxy = m_plugins.get(arguments->destinationID())) 118 return pluginProxy->didReceiveSyncPluginProxyMessage(connection, messageID, arguments, reply); 119 if (PluginProxy* pluginProxy = m_plugins.get(arguments->destinationID())) { 120 pluginProxy->didReceiveSyncPluginProxyMessage(connection, messageID, arguments, reply); 121 return; 122 } 119 123 120 124 ASSERT_NOT_REACHED(); 121 return CoreIPC::AutomaticReply;122 125 } 123 126 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnection.h
r84293 r86812 64 64 // CoreIPC::Connection::Client 65 65 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 66 virtual CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);66 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 67 67 virtual void didClose(CoreIPC::Connection*); 68 68 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID); -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProxy.h
r86522 r86812 58 58 59 59 void didReceivePluginProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments); 60 CoreIPC::SyncReplyMode didReceiveSyncPluginProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);60 void didReceiveSyncPluginProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 61 61 62 62 private: -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r86612 r86812 1995 1995 } 1996 1996 1997 CoreIPC::SyncReplyMode WebPage::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)1997 void WebPage::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 1998 1998 { 1999 returndidReceiveSyncWebPageMessage(connection, messageID, arguments, reply);1999 didReceiveSyncWebPageMessage(connection, messageID, arguments, reply); 2000 2000 } 2001 2001 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r86305 r86812 192 192 // -- Called from WebProcess. 193 193 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 194 CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);194 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 195 195 196 196 // -- InjectedBundle methods … … 435 435 436 436 void didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 437 CoreIPC::SyncReplyMode didReceiveSyncWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);437 void didReceiveSyncWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 438 438 439 439 #if !PLATFORM(MAC) -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r85573 r86812 560 560 } 561 561 562 CoreIPC::SyncReplyMode WebProcess::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*reply)562 void WebProcess::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply) 563 563 { 564 564 uint64_t pageID = arguments->destinationID(); 565 565 if (!pageID) 566 return CoreIPC::AutomaticReply;566 return; 567 567 568 568 WebPage* page = webPage(pageID); 569 569 if (!page) 570 return CoreIPC::AutomaticReply;570 return; 571 571 572 572 page->didReceiveSyncMessage(connection, messageID, arguments, reply); 573 return CoreIPC::AutomaticReply;574 573 } 575 574 -
trunk/Source/WebKit2/WebProcess/WebProcess.h
r86678 r86812 182 182 // CoreIPC::Connection::Client 183 183 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 184 virtual CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);184 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&); 185 185 virtual void didClose(CoreIPC::Connection*); 186 186 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID);
Note: See TracChangeset
for help on using the changeset viewer.