Commit 91cacbfc authored by andersca@apple.com's avatar andersca@apple.com

2011-05-02 Anders Carlsson <andersca@apple.com>

        Reviewed by Oliver Hunt.

        Dispatch the PluginProcessCrashed on the connection work queue
        https://bugs.webkit.org/show_bug.cgi?id=59996

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initialize):
        Add the web process as a queue client.

        (WebKit::WebProcess::terminate):
        Remove the web process as a queue client.

        (WebKit::WebProcess::willProcessMessageOnClientRunLoop):
        Try calling willProcessWebProcessMessageOnClientRunLoop.

        * WebProcess/WebProcess.messages.in:
        Add the DispatchOnConnectionQueue attribute to PluginProcessCrashed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c78c02b4
2011-05-02 Anders Carlsson <andersca@apple.com>
Reviewed by Oliver Hunt.
Dispatch the PluginProcessCrashed on the connection work queue
https://bugs.webkit.org/show_bug.cgi?id=59996
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initialize):
Add the web process as a queue client.
(WebKit::WebProcess::terminate):
Remove the web process as a queue client.
(WebKit::WebProcess::willProcessMessageOnClientRunLoop):
Try calling willProcessWebProcessMessageOnClientRunLoop.
* WebProcess/WebProcess.messages.in:
Add the DispatchOnConnectionQueue attribute to PluginProcessCrashed.
2011-05-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......
......@@ -149,6 +149,7 @@ void WebProcess::initialize(CoreIPC::Connection::Identifier serverIdentifier, Ru
m_connection = CoreIPC::Connection::createClientConnection(serverIdentifier, this, runLoop);
m_connection->setDidCloseOnConnectionWorkQueueCallback(didCloseOnConnectionWorkQueue);
m_connection->setShouldExitOnSyncMessageSendFailure(true);
m_connection->addQueueClient(this);
m_connection->open();
......@@ -550,6 +551,7 @@ void WebProcess::terminate()
#endif
// Invalidate our connection.
m_connection->removeQueueClient(this);
m_connection->invalidate();
m_connection = nullptr;
......@@ -674,6 +676,14 @@ void WebProcess::syncMessageSendTimedOut(CoreIPC::Connection*)
{
}
bool WebProcess::willProcessMessageOnClientRunLoop(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
if (messageID.is<CoreIPC::MessageClassWebProcess>())
return willProcessWebProcessMessageOnClientRunLoop(connection, messageID, arguments);
return true;
}
WebFrame* WebProcess::webFrame(uint64_t frameID) const
{
return m_frameMap.get(frameID);
......
......@@ -66,7 +66,7 @@ struct WebPageGroupData;
struct WebPreferencesStore;
struct WebProcessCreationParameters;
class WebProcess : public ChildProcess {
class WebProcess : public ChildProcess, private CoreIPC::Connection::QueueClient {
public:
static WebProcess& shared();
......@@ -182,13 +182,17 @@ private:
virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID);
virtual void syncMessageSendTimedOut(CoreIPC::Connection*);
// CoreIPC::Connection::QueueClient
virtual bool willProcessMessageOnClientRunLoop(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
#if PLATFORM(WIN)
Vector<HWND> windowsToReceiveSentMessagesWhileWaitingForSyncReply();
#endif
// Implemented in generated WebProcessMessageReceiver.cpp
bool willProcessWebProcessMessageOnClientRunLoop(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void didReceiveWebProcessMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
RefPtr<CoreIPC::Connection> m_connection;
HashMap<uint64_t, RefPtr<WebPage> > m_pageMap;
HashMap<uint64_t, RefPtr<WebPageGroupProxy> > m_pageGroupMap;
......
......@@ -53,7 +53,7 @@ messages -> WebProcess {
#endif
#if ENABLE(PLUGIN_PROCESS)
PluginProcessCrashed(String pluginProcess)
PluginProcessCrashed(String pluginProcess) DispatchOnConnectionQueue
#endif
void StartMemorySampler(WebKit::SandboxExtension::Handle sampleLogFileHandle, WTF::String sampleLogFilePath, double interval);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment