Commit c78c02b4 authored by andersca@apple.com's avatar andersca@apple.com

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

        Reviewed by Sam Weinig.

        Send a PluginProcessCrashed message to all web processes when a plug-in crashes
        https://bugs.webkit.org/show_bug.cgi?id=59994

        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::didClose):
        Iterate over all contexts and send PluginProcessCrashed to all web processes in each context.

        (WebKit::PluginProcessProxy::didFinishLaunching):
        Call setShouldCloseConnectionOnMachExceptions on the CoreIPC connection.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::pluginProcessCrashed):
        Add empty stub.

        * WebProcess/WebProcess.messages.in:
        Add message.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7a5212b8
2011-05-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Send a PluginProcessCrashed message to all web processes when a plug-in crashes
https://bugs.webkit.org/show_bug.cgi?id=59994
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didClose):
Iterate over all contexts and send PluginProcessCrashed to all web processes in each context.
(WebKit::PluginProcessProxy::didFinishLaunching):
Call setShouldCloseConnectionOnMachExceptions on the CoreIPC connection.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::pluginProcessCrashed):
Add empty stub.
* WebProcess/WebProcess.messages.in:
Add message.
2011-05-02 Anders Carlsson <andersca@apple.com>
Reviewed by Simon Fraser.
......
......@@ -32,8 +32,10 @@
#include "PluginProcessManager.h"
#include "PluginProcessMessages.h"
#include "RunLoop.h"
#include "WebContext.h"
#include "WebCoreArgumentCoders.h"
#include "WebPluginSiteDataManager.h"
#include "WebProcessMessages.h"
#include "WebProcessProxy.h"
#if PLATFORM(MAC)
......@@ -166,6 +168,10 @@ void PluginProcessProxy::didClose(CoreIPC::Connection*)
#endif
pluginProcessCrashedOrFailedToLaunch();
const Vector<WebContext*>& contexts = WebContext::allContexts();
for (size_t i = 0; i < contexts.size(); ++i)
contexts[i]->sendToAllProcesses(Messages::WebProcess::PluginProcessCrashed(m_pluginInfo.path));
}
void PluginProcessProxy::didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID)
......@@ -186,6 +192,10 @@ void PluginProcessProxy::didFinishLaunching(ProcessLauncher*, CoreIPC::Connectio
}
m_connection = CoreIPC::Connection::createServerConnection(connectionIdentifier, this, RunLoop::main());
#if PLATFORM(MAC)
m_connection->setShouldCloseConnectionOnMachExceptions();
#endif
m_connection->open();
PluginProcessCreationParameters parameters;
......
......@@ -783,6 +783,13 @@ void WebProcess::clearPluginSiteData(const Vector<String>& pluginPaths, const Ve
}
#endif
#if ENABLE(PLUGIN_PROCESS)
void WebProcess::pluginProcessCrashed(const String& pluginPath)
{
// FIXME: Implement.
}
#endif
void WebProcess::downloadRequest(uint64_t downloadID, uint64_t initiatingPageID, const ResourceRequest& request)
{
WebPage* initiatingPage = initiatingPageID ? webPage(initiatingPageID) : 0;
......
......@@ -159,6 +159,10 @@ private:
void clearPluginSiteData(const Vector<String>& pluginPaths, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
#endif
#if ENABLE(PLUGIN_PROCESS)
void pluginProcessCrashed(const String& pluginPath);
#endif
void startMemorySampler(const SandboxExtension::Handle&, const String&, const double);
void stopMemorySampler();
......
......@@ -45,12 +45,17 @@ messages -> WebProcess {
SetShouldPaintNativeControls(bool shouldPaintNativeControls)
#endif
#if !ENABLE(PLUGIN_PROCESS)
# Plug-ins.
#if !ENABLE(PLUGIN_PROCESS)
GetSitesWithPluginData(Vector<WTF::String> pluginPaths, uint64_t callbackID)
ClearPluginSiteData(Vector<WTF::String> pluginPaths, Vector<WTF::String> sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
#endif
#if ENABLE(PLUGIN_PROCESS)
PluginProcessCrashed(String pluginProcess)
#endif
void StartMemorySampler(WebKit::SandboxExtension::Handle sampleLogFileHandle, WTF::String sampleLogFilePath, double interval);
void StopMemorySampler();
......
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