Changeset 136770 in webkit
- Timestamp:
- Dec 5, 2012 3:28:31 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/CMakeLists.txt
r136760 r136770 138 138 Shared/APIObject.cpp 139 139 Shared/ChildProcess.cpp 140 Shared/ChildProcessProxy.cpp 140 141 Shared/ConnectionStack.cpp 141 142 Shared/DictionaryPopupInfo.cpp -
trunk/Source/WebKit2/ChangeLog
r136766 r136770 1 2012-12-05 Alexey Proskuryakov <ap@apple.com> 2 3 [WK2] Would like to queue messages while NetworkProcess is launching 4 https://bugs.webkit.org/show_bug.cgi?id=104143 5 6 Reviewed by Anders Carlsson. 7 8 Factored out process launching and message sending code to a ChildProcessProxy class. 9 Process closing and crashing code should be moved once we better understand common 10 requirements for the processes. 11 12 * CMakeLists.txt: 13 * GNUmakefile.list.am: 14 * Target.pri: 15 * WebKit2.xcodeproj/project.pbxproj: 16 * win/WebKit2.vcproj: 17 Added ChildProcessProxy files. 18 19 * Shared/ChildProcessProxy.cpp: Added. 20 (WebKit::ChildProcessProxy::ChildProcessProxy): 21 (WebKit::ChildProcessProxy::~ChildProcessProxy): 22 (WebKit::ChildProcessProxy::fromConnection): 23 (WebKit::ChildProcessProxy::connect): 24 (WebKit::ChildProcessProxy::terminate): 25 (WebKit::ChildProcessProxy::sendMessage): 26 (WebKit::ChildProcessProxy::isLaunching): 27 (WebKit::ChildProcessProxy::didFinishLaunching): 28 (WebKit::ChildProcessProxy::clearConnection): 29 * Shared/ChildProcessProxy.h: Added. 30 (WebKit::ChildProcessProxy::connection): 31 (WebKit::ChildProcessProxy::isValid): 32 (WebKit::ChildProcessProxy::canSendMessage): 33 (WebKit::ChildProcessProxy::processIdentifier): 34 (WebKit::ChildProcessProxy::send): 35 (WebKit::ChildProcessProxy::sendSync): 36 Moved code from WebProcessProxy. Every ChildProcessProxy is a connection client, 37 but every one is a connection queue client, so that latter is passed as an argument. 38 39 * UIProcess/Network/NetworkProcessProxy.h: 40 * UIProcess/Network/NetworkProcessProxy.cpp: 41 Removed unused syncMessageSendTimedOut(), thank you OVERRIDE. 42 43 * UIProcess/Network/NetworkProcessProxy.cpp: 44 (WebKit::NetworkProcessProxy::NetworkProcessProxy): 45 (WebKit::NetworkProcessProxy::getLaunchOptions): 46 (WebKit::NetworkProcessProxy::~NetworkProcessProxy): 47 (WebKit::NetworkProcessProxy::getNetworkProcessConnection): 48 (WebKit::NetworkProcessProxy::didFinishLaunching): 49 * UIProcess/Network/NetworkProcessProxy.h: 50 * UIProcess/Network/mac/NetworkProcessProxyMac.mm: 51 (WebKit::NetworkProcessProxy::setApplicationIsOccluded): 52 * UIProcess/WebProcessProxy.cpp: 53 (WebKit::WebProcessProxy::WebProcessProxy): 54 (WebKit::WebProcessProxy::~WebProcessProxy): 55 (WebKit::WebProcessProxy::getLaunchOptions): 56 (WebKit::WebProcessProxy::disconnect): 57 (WebKit::WebProcessProxy::didFinishLaunching): 58 Use shared code. 59 60 * UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::fromConnection): 61 NetworkProcess inherits from conneciton client privately, so we need to do most 62 of the work in ClientProcessProxy, and further upcast here. 63 64 * UIProcess/efl/WebProcessProxyEfl.cpp: 65 (WebKit::WebProcessProxy::platformGetLaunchOptions): 66 * UIProcess/gtk/WebProcessProxyGtk.cpp: 67 (WebKit::WebProcessProxy::platformGetLaunchOptions): 68 * UIProcess/mac/WebProcessProxyMac.mm: 69 (WebKit::WebProcessProxy::platformGetLaunchOptions): 70 * UIProcess/qt/WebProcessProxyQt.cpp: 71 (WebKit::WebProcessProxy::platformGetLaunchOptions): 72 * UIProcess/win/WebProcessProxyWin.cpp: 73 (WebKit::WebProcessProxy::platformGetLaunchOptions): 74 Updated for renaming, platformConnect -> platformGetLaunchOptions(). 75 1 76 2012-12-05 Kiran Muppala <cmuppala@apple.com> 2 77 -
trunk/Source/WebKit2/GNUmakefile.list.am
r136354 r136770 370 370 Source/WebKit2/Shared/ChildProcess.cpp \ 371 371 Source/WebKit2/Shared/ChildProcess.h \ 372 Source/WebKit2/Shared/ChildProcessProxy.cpp \ 373 Source/WebKit2/Shared/ChildProcessProxy.h \ 372 374 Source/WebKit2/Shared/CommandLine.h \ 373 375 Source/WebKit2/Shared/ConnectionStack.cpp \ … … 1275 1277 Source/WebKit2/Shared/ChildProcess.cpp \ 1276 1278 Source/WebKit2/Shared/ChildProcess.h \ 1279 Source/WebKit2/Shared/ChildProcessProxy.cpp \ 1280 Source/WebKit2/Shared/ChildProcessProxy.h \ 1277 1281 Source/WebKit2/Shared/ConnectionStack.cpp \ 1278 1282 Source/WebKit2/Shared/ConnectionStack.h \ -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r133045 r136770 93 93 } 94 94 95 void NetworkProcess::syncMessageSendTimedOut(CoreIPC::Connection*)96 {97 }98 99 95 void NetworkProcess::initializeNetworkProcess(const NetworkProcessCreationParameters& parameters) 100 96 { -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h
r133045 r136770 60 60 61 61 // ChildProcess 62 virtual bool shouldTerminate() ;62 virtual bool shouldTerminate() OVERRIDE; 63 63 64 64 // CoreIPC::Connection::Client 65 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&); 66 virtual void didClose(CoreIPC::Connection*); 67 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName); 68 virtual void syncMessageSendTimedOut(CoreIPC::Connection*); 65 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) OVERRIDE; 66 virtual void didClose(CoreIPC::Connection*) OVERRIDE; 67 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) OVERRIDE; 69 68 70 69 // Message Handlers -
trunk/Source/WebKit2/Target.pri
r136760 r136770 75 75 Shared/CacheModel.h \ 76 76 Shared/ChildProcess.h \ 77 Shared/ChildProcessProxy.h \ 77 78 Shared/ConnectionStack.h \ 78 79 Shared/DictionaryPopupInfo.h \ … … 451 452 Shared/Plugins/PluginProcessCreationParameters.cpp \ 452 453 Shared/ChildProcess.cpp \ 454 Shared/ChildProcessProxy.cpp \ 453 455 Shared/ConnectionStack.cpp \ 454 456 Shared/DictionaryPopupInfo.cpp \ -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
r133699 r136770 49 49 , m_numPendingConnectionRequests(0) 50 50 { 51 ProcessLauncher::LaunchOptions launchOptions; 51 connect(); 52 } 53 54 void NetworkProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) 55 { 52 56 launchOptions.processType = ProcessLauncher::NetworkProcess; 53 57 … … 59 63 #endif 60 64 #endif 61 62 m_processLauncher = ProcessLauncher::create(this, launchOptions);63 65 } 64 66 65 67 NetworkProcessProxy::~NetworkProcessProxy() 66 68 { 67 68 69 } 69 70 … … 72 73 m_pendingConnectionReplies.append(reply); 73 74 74 if ( m_processLauncher->isLaunching()) {75 if (isLaunching()) { 75 76 m_numPendingConnectionRequests++; 76 77 return; 77 78 } 78 79 79 m_connection->send(Messages::NetworkProcess::CreateNetworkConnectionToWebProcess(), 0, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);80 connection()->send(Messages::NetworkProcess::CreateNetworkConnectionToWebProcess(), 0, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply); 80 81 } 81 82 … … 115 116 void NetworkProcessProxy::didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference, CoreIPC::StringReference) 116 117 { 117 118 }119 120 void NetworkProcessProxy::syncMessageSendTimedOut(CoreIPC::Connection*)121 {122 123 118 } 124 119 … … 137 132 } 138 133 139 void NetworkProcessProxy::didFinishLaunching(ProcessLauncher* , CoreIPC::Connection::Identifier connectionIdentifier)134 void NetworkProcessProxy::didFinishLaunching(ProcessLauncher* launcher, CoreIPC::Connection::Identifier connectionIdentifier) 140 135 { 141 ASSERT(!m_connection);136 ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); 142 137 143 138 if (CoreIPC::Connection::identifierIsNull(connectionIdentifier)) { … … 146 141 } 147 142 148 m_connection = CoreIPC::Connection::createServerConnection(connectionIdentifier, this, RunLoop::main());149 #if PLATFORM(MAC)150 m_connection->setShouldCloseConnectionOnMachExceptions();151 #endif152 153 m_connection->open();154 155 143 NetworkProcessCreationParameters parameters; 156 144 platformInitializeNetworkProcess(parameters); 157 145 158 146 // Initialize the network host process. 159 m_connection->send(Messages::NetworkProcess::InitializeNetworkProcess(parameters), 0);147 connection()->send(Messages::NetworkProcess::InitializeNetworkProcess(parameters), 0); 160 148 161 149 for (unsigned i = 0; i < m_numPendingConnectionRequests; ++i) 162 m_connection->send(Messages::NetworkProcess::CreateNetworkConnectionToWebProcess(), 0);150 connection()->send(Messages::NetworkProcess::CreateNetworkConnectionToWebProcess(), 0); 163 151 164 152 m_numPendingConnectionRequests = 0; … … 166 154 #if PLATFORM(MAC) 167 155 if (WebContext::applicationIsOccluded()) 168 m_connection->send(Messages::NetworkProcess::SetApplicationIsOccluded(true), 0);156 connection()->send(Messages::NetworkProcess::SetApplicationIsOccluded(true), 0); 169 157 #endif 170 158 } -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h
r133699 r136770 29 29 #if ENABLE(NETWORK_PROCESS) 30 30 31 #include "ChildProcessProxy.h" 31 32 #include "Connection.h" 32 33 #include "ProcessLauncher.h" … … 39 40 struct NetworkProcessCreationParameters; 40 41 41 class NetworkProcessProxy : public RefCounted<NetworkProcessProxy>, CoreIPC::Connection::Client, ProcessLauncher::Client{42 class NetworkProcessProxy : public RefCounted<NetworkProcessProxy>, public ChildProcessProxy { 42 43 public: 43 44 static PassRefPtr<NetworkProcessProxy> create(NetworkProcessManager*); … … 45 46 46 47 void getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>); 47 48 bool isValid() const { return m_connection; }49 48 50 49 #if PLATFORM(MAC) … … 55 54 NetworkProcessProxy(NetworkProcessManager*); 56 55 56 virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) OVERRIDE; 57 57 void platformInitializeNetworkProcess(NetworkProcessCreationParameters&); 58 58 … … 60 60 61 61 // CoreIPC::Connection::Client 62 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&); 63 virtual void didClose(CoreIPC::Connection*); 64 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName); 65 virtual void syncMessageSendTimedOut(CoreIPC::Connection*); 62 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) OVERRIDE; 63 virtual void didClose(CoreIPC::Connection*) OVERRIDE; 64 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) OVERRIDE; 66 65 67 66 // Message handlers … … 71 70 // ProcessLauncher::Client 72 71 virtual void didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier); 73 74 // The connection to the network process.75 RefPtr<CoreIPC::Connection> m_connection;76 77 // The process launcher for the network process.78 RefPtr<ProcessLauncher> m_processLauncher;79 72 80 73 NetworkProcessManager* m_networkProcessManager; -
trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm
r133699 r136770 46 46 return; 47 47 48 m_connection->send(Messages::NetworkProcess::SetApplicationIsOccluded(applicationIsOccluded), 0);48 connection()->send(Messages::NetworkProcess::SetApplicationIsOccluded(applicationIsOccluded), 0); 49 49 } 50 50 -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r136193 r136770 91 91 92 92 WebProcessProxy::WebProcessProxy(PassRefPtr<WebContext> context) 93 : m_responsivenessTimer(this) 93 : ChildProcessProxy(this) 94 , m_responsivenessTimer(this) 94 95 , m_context(context) 95 96 , m_mayHaveUniversalFileReadSandboxExtension(false) … … 103 104 WebProcessProxy::~WebProcessProxy() 104 105 { 105 if (m_connection)106 m_connection->invalidate();107 108 106 if (m_webConnection) 109 107 m_webConnection->invalidate(); 110 111 for (size_t i = 0; i < m_pendingMessages.size(); ++i) 112 m_pendingMessages[i].first.releaseArguments(); 113 114 if (m_processLauncher) { 115 m_processLauncher->invalidate(); 116 m_processLauncher = 0; 117 } 118 } 119 120 WebProcessProxy* WebProcessProxy::fromConnection(CoreIPC::Connection* connection) 121 { 122 ASSERT(connection); 123 124 WebProcessProxy* webProcessProxy = static_cast<WebProcessProxy*>(connection->client()); 125 ASSERT(webProcessProxy->connection() == connection); 126 127 return webProcessProxy; 128 } 129 130 void WebProcessProxy::connect() 131 { 132 ASSERT(!m_processLauncher); 133 134 ProcessLauncher::LaunchOptions launchOptions; 108 } 109 110 void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) 111 { 135 112 launchOptions.processType = ProcessLauncher::WebProcess; 136 platformConnect(launchOptions); 137 138 m_processLauncher = ProcessLauncher::create(this, launchOptions); 113 platformGetLaunchOptions(launchOptions); 139 114 } 140 115 141 116 void WebProcessProxy::disconnect() 142 117 { 143 if (m_connection) { 144 m_connection->removeQueueClient(this); 145 m_connection->invalidate(); 146 m_connection = nullptr; 147 } 118 clearConnection(); 148 119 149 120 if (m_webConnection) { … … 162 133 163 134 m_context->disconnectProcess(this); 164 }165 166 bool WebProcessProxy::sendMessage(CoreIPC::MessageID messageID, PassOwnPtr<CoreIPC::MessageEncoder> encoder, unsigned messageSendFlags)167 {168 // If we're waiting for the web process to launch, we need to stash away the messages so we can send them once we have169 // a CoreIPC connection.170 if (isLaunching()) {171 m_pendingMessages.append(make_pair(CoreIPC::Connection::OutgoingMessage(messageID, encoder), messageSendFlags));172 return true;173 }174 175 // If the web process has exited, m_connection will be null here.176 if (!m_connection)177 return false;178 179 return connection()->sendMessage(messageID, encoder, messageSendFlags);180 }181 182 bool WebProcessProxy::isLaunching() const183 {184 if (m_processLauncher)185 return m_processLauncher->isLaunching();186 187 return false;188 }189 190 void WebProcessProxy::terminate()191 {192 if (m_processLauncher)193 m_processLauncher->terminateProcess();194 135 } 195 136 … … 555 496 } 556 497 557 void WebProcessProxy::didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier connectionIdentifier) 558 { 559 didFinishLaunching(connectionIdentifier); 560 } 561 562 void WebProcessProxy::didFinishLaunching(CoreIPC::Connection::Identifier connectionIdentifier) 563 { 564 ASSERT(!m_connection); 565 566 m_connection = CoreIPC::Connection::createServerConnection(connectionIdentifier, this, RunLoop::main()); 567 #if OS(DARWIN) 568 m_connection->setShouldCloseConnectionOnMachExceptions(); 569 #elif PLATFORM(QT) && !OS(WINDOWS) 570 m_connection->setShouldCloseConnectionOnProcessTermination(processIdentifier()); 571 #endif 572 573 m_connection->addQueueClient(this); 574 m_connection->open(); 498 void WebProcessProxy::didFinishLaunching(ProcessLauncher* launcher, CoreIPC::Connection::Identifier connectionIdentifier) 499 { 500 ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); 575 501 576 502 m_webConnection = WebConnectionToWebProcess::create(this); 577 578 for (size_t i = 0; i < m_pendingMessages.size(); ++i) {579 CoreIPC::Connection::OutgoingMessage& outgoingMessage = m_pendingMessages[i].first;580 unsigned messageSendFlags = m_pendingMessages[i].second;581 connection()->sendMessage(outgoingMessage.messageID(), adoptPtr(outgoingMessage.arguments()), messageSendFlags);582 }583 584 m_pendingMessages.clear();585 503 586 504 // Tell the context that we finished launching. -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.h
r136612 r136770 27 27 #define WebProcessProxy_h 28 28 29 #include "ChildProcessProxy.h" 29 30 #include "MessageReceiverMap.h" 30 31 #include "PlatformProcessIdentifier.h" … … 61 62 struct WebNavigationDataStore; 62 63 63 class WebProcessProxy : public ThreadSafeRefCounted<WebProcessProxy>, CoreIPC::Connection::Client, ResponsivenessTimer::Client, ProcessLauncher::Client, CoreIPC::Connection::QueueClient {64 class WebProcessProxy : public ThreadSafeRefCounted<WebProcessProxy>, public ChildProcessProxy, ResponsivenessTimer::Client, CoreIPC::Connection::QueueClient { 64 65 public: 65 66 typedef HashMap<uint64_t, RefPtr<WebFrameProxy> > WebFrameProxyMap; … … 69 70 ~WebProcessProxy(); 70 71 71 static WebProcessProxy* fromConnection(CoreIPC::Connection*); 72 73 void terminate(); 74 75 template<typename T> bool send(const T& message, uint64_t destinationID, unsigned messageSendFlags = 0); 76 template<typename U> bool sendSync(const U& message, const typename U::Reply& reply, uint64_t destinationID, double timeout = 1); 77 78 CoreIPC::Connection* connection() const 79 { 80 ASSERT(m_connection); 81 return m_connection.get(); 72 static WebProcessProxy* fromConnection(CoreIPC::Connection* connection) 73 { 74 return static_cast<WebProcessProxy*>(ChildProcessProxy::fromConnection(connection)); 82 75 } 83 76 … … 89 82 90 83 WebContext* context() const { return m_context.get(); } 91 92 PlatformProcessIdentifier processIdentifier() const { return m_processLauncher->processIdentifier(); }93 84 94 85 WebPageProxy* webPage(uint64_t pageID) const; … … 106 97 ResponsivenessTimer* responsivenessTimer() { return &m_responsivenessTimer; } 107 98 108 bool isValid() const { return m_connection; }109 bool isLaunching() const;110 bool canSendMessage() const { return isValid() || isLaunching(); }111 112 99 WebFrameProxy* webFrame(uint64_t) const; 113 100 bool canCreateFrame(uint64_t frameID) const; … … 131 118 explicit WebProcessProxy(PassRefPtr<WebContext>); 132 119 133 // Initializes the process launcher which will begin launching the process. 134 void connect(); 135 void platformConnect(ProcessLauncher::LaunchOptions&); 120 void getLaunchOptions(ProcessLauncher::LaunchOptions&); 121 void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&); 136 122 137 123 // Called when the web process has crashed or we know that it will terminate soon. 138 124 // Will potentially cause the WebProcessProxy object to be freed. 139 125 void disconnect(); 140 141 bool sendMessage(CoreIPC::MessageID, PassOwnPtr<CoreIPC::MessageEncoder>, unsigned messageSendFlags);142 126 143 127 // CoreIPC message handlers. … … 173 157 // CoreIPC::Connection::Client 174 158 friend class WebConnectionToWebProcess; 175 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) ;176 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) ;177 virtual void didClose(CoreIPC::Connection*) ;178 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) ;159 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) OVERRIDE; 160 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE; 161 virtual void didClose(CoreIPC::Connection*) OVERRIDE; 162 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) OVERRIDE; 179 163 #if PLATFORM(WIN) 180 virtual Vector<HWND> windowsToReceiveSentMessagesWhileWaitingForSyncReply() ;164 virtual Vector<HWND> windowsToReceiveSentMessagesWhileWaitingForSyncReply() OVERRIDE; 181 165 #endif 182 166 … … 190 174 191 175 // ProcessLauncher::Client 192 virtual void didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier); 193 194 void didFinishLaunching(CoreIPC::Connection::Identifier); 176 virtual void didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier) OVERRIDE; 195 177 196 178 // History client … … 207 189 ResponsivenessTimer m_responsivenessTimer; 208 190 209 210 RefPtr<CoreIPC::Connection> m_connection;211 191 RefPtr<WebConnectionToWebProcess> m_webConnection; 212 192 CoreIPC::MessageReceiverMap m_messageReceiverMap; 213 214 Vector<std::pair<CoreIPC::Connection::OutgoingMessage, unsigned> > m_pendingMessages;215 RefPtr<ProcessLauncher> m_processLauncher;216 193 217 194 RefPtr<WebContext> m_context; … … 228 205 #endif 229 206 }; 230 231 template<typename T>232 bool WebProcessProxy::send(const T& message, uint64_t destinationID, unsigned messageSendFlags)233 {234 COMPILE_ASSERT(!T::isSync, AsyncMessageExpected);235 236 OwnPtr<CoreIPC::MessageEncoder> encoder = CoreIPC::MessageEncoder::create(T::receiverName(), T::name(), destinationID);237 encoder->encode(message);238 239 return sendMessage(CoreIPC::MessageID(T::messageID), encoder.release(), messageSendFlags);240 }241 242 template<typename U>243 bool WebProcessProxy::sendSync(const U& message, const typename U::Reply& reply, uint64_t destinationID, double timeout)244 {245 COMPILE_ASSERT(U::isSync, SyncMessageExpected);246 247 if (!m_connection)248 return false;249 250 return connection()->sendSync(message, reply, destinationID, timeout);251 }252 207 253 208 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/efl/WebProcessProxyEfl.cpp
r129451 r136770 29 29 namespace WebKit { 30 30 31 void WebProcessProxy::platform Connect(ProcessLauncher::LaunchOptions& launchOptions)31 void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) 32 32 { 33 33 #ifndef NDEBUG -
trunk/Source/WebKit2/UIProcess/gtk/WebProcessProxyGtk.cpp
r129451 r136770 29 29 namespace WebKit { 30 30 31 void WebProcessProxy::platform Connect(ProcessLauncher::LaunchOptions&)31 void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions&) 32 32 { 33 33 } -
trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm
r136612 r136770 113 113 #endif 114 114 115 void WebProcessProxy::platform Connect(ProcessLauncher::LaunchOptions& launchOptions)115 void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) 116 116 { 117 117 // We want the web process to match the architecture of the UI process. -
trunk/Source/WebKit2/UIProcess/qt/WebProcessProxyQt.cpp
r129451 r136770 29 29 namespace WebKit { 30 30 31 void WebProcessProxy::platform Connect(ProcessLauncher::LaunchOptions&)31 void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions&) 32 32 { 33 33 } -
trunk/Source/WebKit2/UIProcess/win/WebProcessProxyWin.cpp
r129451 r136770 34 34 } 35 35 36 void WebProcessProxy::platform Connect(ProcessLauncher::LaunchOptions&)36 void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions&) 37 37 { 38 38 } -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r136612 r136770 1018 1018 E134F01A12EA5D99004EC58D /* WKPrintingView.mm in Sources */ = {isa = PBXBuildFile; fileRef = E134F01912EA5D99004EC58D /* WKPrintingView.mm */; }; 1019 1019 E13A8A30162879AC00392929 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E13A8A2F162879AC00392929 /* Cocoa.framework */; }; 1020 E1513C66166EABB200149FCB /* ChildProcessProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1513C64166EABB200149FCB /* ChildProcessProxy.cpp */; }; 1021 E1513C67166EABB200149FCB /* ChildProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E1513C65166EABB200149FCB /* ChildProcessProxy.h */; }; 1020 1022 E179FD9C134D38060015B883 /* ArgumentCodersMac.h in Headers */ = {isa = PBXBuildFile; fileRef = E179FD9B134D38060015B883 /* ArgumentCodersMac.h */; }; 1021 1023 E179FD9F134D38250015B883 /* ArgumentCodersMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E179FD9E134D38250015B883 /* ArgumentCodersMac.mm */; }; … … 2309 2311 E14E99F814D879B4001D221F /* PluginProcess.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PluginProcess.entitlements; sourceTree = "<group>"; }; 2310 2312 E14E99F914D879C9001D221F /* add-entitlements.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "add-entitlements.sh"; sourceTree = "<group>"; }; 2313 E1513C64166EABB200149FCB /* ChildProcessProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildProcessProxy.cpp; sourceTree = "<group>"; }; 2314 E1513C65166EABB200149FCB /* ChildProcessProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildProcessProxy.h; sourceTree = "<group>"; }; 2311 2315 E179FD9B134D38060015B883 /* ArgumentCodersMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCodersMac.h; sourceTree = "<group>"; }; 2312 2316 E179FD9E134D38250015B883 /* ArgumentCodersMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ArgumentCodersMac.mm; sourceTree = "<group>"; }; … … 2757 2761 1A2D956E12848564001EB962 /* ChildProcess.cpp */, 2758 2762 1A2D956D12848564001EB962 /* ChildProcess.h */, 2763 E1513C64166EABB200149FCB /* ChildProcessProxy.cpp */, 2764 E1513C65166EABB200149FCB /* ChildProcessProxy.h */, 2759 2765 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */, 2760 2766 5136183B163126DA00A99DDE /* ConnectionStack.cpp */, … … 4996 5002 BC8ACA1316670D89004C1941 /* ObjCObjectGraph.h in Headers */, 4997 5003 BC8ACA1516670D89004C1941 /* ObjCObjectGraphCoders.h in Headers */, 5004 E1513C67166EABB200149FCB /* ChildProcessProxy.h in Headers */, 4998 5005 ); 4999 5006 runOnlyForDeploymentPostprocessing = 0; … … 5949 5956 BC8ACA1416670D89004C1941 /* ObjCObjectGraph.mm in Sources */, 5950 5957 BC8ACA1616670D89004C1941 /* ObjCObjectGraphCoders.mm in Sources */, 5958 E1513C66166EABB200149FCB /* ChildProcessProxy.cpp in Sources */, 5951 5959 ); 5952 5960 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebKit2/win/WebKit2.vcproj
r132085 r136770 424 424 </File> 425 425 <File 426 RelativePath="..\Shared\ChildProcessProxy.cpp" 427 > 428 </File> 429 <File 430 RelativePath="..\Shared\ChildProcessProxy.h" 431 > 432 </File> 433 <File 426 434 RelativePath="..\Shared\CommandLine.h" 427 435 >
Note: See TracChangeset
for help on using the changeset viewer.