Commit 37bdf9c8 authored by andersca@apple.com's avatar andersca@apple.com
Browse files

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

        Reviewed by Sam Weinig.

        WebPluginSiteDataManager should work with plug-in process
        https://bugs.webkit.org/show_bug.cgi?id=54523
        <rdar://problem/8689312>

        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::removeWebProcessConnection):
        Call startShutdownTimerIfNecessary().

        (WebKit::PluginProcess::getSitesWithData):
        Ask the plug-in module for the sites with data and send them back
        in a PluginProcessProxy::DidGetSitesWithData message.

        (WebKit::PluginProcess::clearSiteData):
        Clear site data and send back a DidClearSiteData message.

        (WebKit::PluginProcess::startShutdownTimerIfNecessary):
        Factor code out from removeWebProcessConnection.

        * PluginProcess/PluginProcess.messages.in:
        Add new messages.

        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::plugins):
        New function for getting all...
parent 17ac09d2
2011-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
WebPluginSiteDataManager should work with plug-in process
https://bugs.webkit.org/show_bug.cgi?id=54523
<rdar://problem/8689312>
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::removeWebProcessConnection):
Call startShutdownTimerIfNecessary().
(WebKit::PluginProcess::getSitesWithData):
Ask the plug-in module for the sites with data and send them back
in a PluginProcessProxy::DidGetSitesWithData message.
(WebKit::PluginProcess::clearSiteData):
Clear site data and send back a DidClearSiteData message.
(WebKit::PluginProcess::startShutdownTimerIfNecessary):
Factor code out from removeWebProcessConnection.
* PluginProcess/PluginProcess.messages.in:
Add new messages.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::plugins):
New function for getting all plug-ins.
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::getPluginProcessConnection):
Call getOrCreatePluginProcess.
(WebKit::PluginProcessManager::getSitesWithData):
Get a plug-in process proxy and call getSitesWithData.
(WebKit::PluginProcessManager::clearSiteData):
Get a plug-in process proxy and call clearSiteData.
(WebKit::PluginProcessManager::getOrCreatePluginProcess):
Factor code to create a plug-in process out into a separate function.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getSitesWithData):
(WebKit::PluginProcessProxy::clearSiteData):
Update the pending reply struct. If the process is still launching,
enqueue the request. Otherwise, just send the message.
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
Make sure that pending replies are sent out.
(WebKit::PluginProcessProxy::didFinishLaunching):
Send our pending requests.
(WebKit::PluginProcessProxy::didGetSitesWithData):
(WebKit::PluginProcessProxy::didClearSiteData):
Call down to the plug-in site data manager.
* UIProcess/Plugins/PluginProcessProxy.messages.in:
Add DidGetSitesWithData and DidClearSiteData messages.
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState):
Initialize the state.
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
If the plug-in queue is empty, call didGetSitesWithDataForAllPlugins. Otherwise, ask
the plug-in process manager to get sites for the next plug-in.
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::didGetSitesWithDataForSinglePlugin):
Update the sites set and get sites for the next plug-in.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState):
Initialize the state.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::clearSiteDataForNextPlugin):
If the plug-in queue is empty, call didClearSiteDataForAllPlugins. Otherwise, ask
the plug-in process manager to get sites for the next plug-in.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::didClearSiteDataForSinglePlugin):
Update the sites set and ask the next plug-in to clear site data.
(WebKit::WebPluginSiteDataManager::~WebPluginSiteDataManager):
Assert that all maps are empty.
(WebKit::WebPluginSiteDataManager::invalidate):
Delete and clear the pending state maps.
(WebKit::WebPluginSiteDataManager::getSitesWithData):
In the ENABLE(PLUGIN_PROCESS) case, allocate a new GetSitesWithDataState object and
tell it to get sites for the next plug-in. Otherwise, make sure that the web process
is alive before sending a GetSitesWithPluginData message.
(WebKit::WebPluginSiteDataManager::clearSiteData):
In the ENABLE(PLUGIN_PROCESS) case, allocate a new ClearSiteDataState object and
tell it to get sites for the next plug-in. Otherwise, make sure that the web process
is alive before sending a ClearPluginSiteData message.
(WebKit::WebPluginSiteDataManager::didGetSitesWithDataForSinglePlugin):
Call down to the GetSitesWithDataState object.
(WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
Free the GetSitesWithDataState object and invoke the callback.
(WebKit::WebPluginSiteDataManager::didClearSiteDataForSinglePlugin):
Call down to the GetSitesWithDataState object.
(WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
Free the GetSitesWithDataState object and invoke the callback.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::processDidClose):
Don't invalidate the plug-in site data manager if we're using a plug-in process.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getSitesWithPluginData):
(WebKit::WebProcess::clearPluginSiteData):
Call shutdownIfPossible().
2011-02-15 Jon Honeycutt <jhoneycutt@apple.com>
 
Copy over new WebKit 2 header.
......@@ -28,6 +28,7 @@
#if ENABLE(PLUGIN_PROCESS)
#include "ArgumentCoders.h"
#include "MachPort.h"
#include "NetscapePluginModule.h"
#include "PluginProcessProxyMessages.h"
......@@ -72,10 +73,7 @@ void PluginProcess::removeWebProcessConnection(WebProcessConnection* webProcessC
m_webProcessConnections.remove(vectorIndex);
if (m_webProcessConnections.isEmpty()) {
// Start the shutdown timer.
m_shutdownTimer.startOneShot(shutdownTimeout);
}
startShutdownTimerIfNecessary();
}
NetscapePluginModule* PluginProcess::netscapePluginModule()
......@@ -146,6 +144,43 @@ void PluginProcess::createWebProcessConnection()
m_shutdownTimer.stop();
}
void PluginProcess::getSitesWithData(uint64_t callbackID)
{
Vector<String> sites;
if (NetscapePluginModule* module = netscapePluginModule())
sites = module->sitesWithData();
m_connection->send(Messages::PluginProcessProxy::DidGetSitesWithData(sites, callbackID), 0);
startShutdownTimerIfNecessary();
}
void PluginProcess::clearSiteData(const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
{
if (NetscapePluginModule* module = netscapePluginModule()) {
if (sites.isEmpty()) {
// Clear everything.
module->clearSiteData(String(), flags, maxAgeInSeconds);
} else {
for (size_t i = 0; i < sites.size(); ++i)
module->clearSiteData(sites[i], flags, maxAgeInSeconds);
}
}
m_connection->send(Messages::PluginProcessProxy::DidClearSiteData(callbackID), 0);
startShutdownTimerIfNecessary();
}
void PluginProcess::startShutdownTimerIfNecessary()
{
if (!m_webProcessConnections.isEmpty())
return;
// Start the shutdown timer.
m_shutdownTimer.startOneShot(shutdownTimeout);
}
void PluginProcess::shutdownTimerFired()
{
RunLoop::current()->stop();
......
......@@ -71,7 +71,10 @@ private:
void didReceivePluginProcessMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void initializePluginProcess(const PluginProcessCreationParameters&);
void createWebProcessConnection();
void getSitesWithData(uint64_t callbackID);
void clearSiteData(const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
void startShutdownTimerIfNecessary();
void shutdownTimerFired();
void platformInitialize(const PluginProcessCreationParameters&);
......
......@@ -30,6 +30,14 @@ messages -> PluginProcess {
# The plug-in process sends back a DidCreateWebProcessConnection message with
# a connection identifier.
CreateWebProcessConnection()
# Asks the plug-in process for sites with data. The plug-in process sends back a
# DidGetSitesWithData message with the sites.
GetSitesWithData(uint64_t callbackID)
# Asks the plug-in to clear data for the given sites. The plug-in process sends back
# a DidClearSiteData message when done.
ClearSiteData(Vector<WTF::String> sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
}
#endif
......@@ -123,6 +123,13 @@ void PluginInfoStore::getPluginPaths(Vector<String>& pluginPaths)
pluginPaths.append(m_plugins[i].path);
}
const Vector<PluginInfoStore::Plugin>& PluginInfoStore::plugins()
{
loadPluginsIfNecessary();
return m_plugins;
}
PluginInfoStore::Plugin PluginInfoStore::findPluginForMIMEType(const String& mimeType)
{
ASSERT(!mimeType.isNull());
......
......@@ -57,6 +57,8 @@ public:
#endif
};
const Vector<Plugin>& plugins();
// Returns the info for a plug-in that can handle the given MIME type.
// If the MIME type is null, the file extension of the given url will be used to infer the
// plug-in type. In that case, mimeType will be filled in with the right MIME type.
......
......@@ -28,7 +28,6 @@
#if ENABLE(PLUGIN_PROCESS)
#include "PluginInfoStore.h"
#include "PluginProcessProxy.h"
#include "WebContext.h"
#include <wtf/StdLibExtras.h>
......@@ -51,20 +50,7 @@ void PluginProcessManager::getPluginProcessConnection(const String& pluginPath,
ASSERT(!pluginPath.isNull());
PluginInfoStore::Plugin plugin = webProcessProxy->context()->pluginInfoStore()->infoForPluginWithPath(pluginPath);
PluginProcessProxy* pluginProcess = 0;
for (size_t i = 0; i < m_pluginProcesses.size(); ++i) {
if (m_pluginProcesses[i]->pluginInfo().path == plugin.path) {
pluginProcess = m_pluginProcesses[i];
break;
}
}
if (!pluginProcess) {
pluginProcess = PluginProcessProxy::create(this, plugin).leakPtr();
m_pluginProcesses.append(pluginProcess);
}
PluginProcessProxy* pluginProcess = getOrCreatePluginProcess(plugin);
pluginProcess->createWebProcessConnection(webProcessProxy, reply);
}
......@@ -77,6 +63,31 @@ void PluginProcessManager::removePluginProcessProxy(PluginProcessProxy* pluginPr
m_pluginProcesses.remove(vectorIndex);
}
void PluginProcessManager::getSitesWithData(const PluginInfoStore::Plugin& plugin, WebPluginSiteDataManager* webPluginSiteDataManager, uint64_t callbackID)
{
PluginProcessProxy* pluginProcess = getOrCreatePluginProcess(plugin);
pluginProcess->getSitesWithData(webPluginSiteDataManager, callbackID);
}
void PluginProcessManager::clearSiteData(const PluginInfoStore::Plugin& plugin, WebPluginSiteDataManager* webPluginSiteDataManager, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
{
PluginProcessProxy* pluginProcess = getOrCreatePluginProcess(plugin);
pluginProcess->clearSiteData(webPluginSiteDataManager, sites, flags, maxAgeInSeconds, callbackID);
}
PluginProcessProxy* PluginProcessManager::getOrCreatePluginProcess(const PluginInfoStore::Plugin& plugin)
{
for (size_t i = 0; i < m_pluginProcesses.size(); ++i) {
if (m_pluginProcesses[i]->pluginInfo().path == plugin.path)
return m_pluginProcesses[i];
}
PluginProcessProxy* pluginProcess = PluginProcessProxy::create(this, plugin).leakPtr();
m_pluginProcesses.append(pluginProcess);
return pluginProcess;
}
} // namespace WebKit
#endif // ENABLE(PLUGIN_PROCESS)
......@@ -28,6 +28,7 @@
#if ENABLE(PLUGIN_PROCESS)
#include "PluginInfoStore.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/Vector.h>
......@@ -40,6 +41,7 @@ namespace WebKit {
class PluginProcessProxy;
class WebProcessProxy;
class WebPluginSiteDataManager;
class PluginProcessManager {
WTF_MAKE_NONCOPYABLE(PluginProcessManager);
......@@ -49,9 +51,14 @@ public:
void getPluginProcessConnection(const String& pluginPath, WebProcessProxy*, CoreIPC::ArgumentEncoder* reply);
void removePluginProcessProxy(PluginProcessProxy*);
void getSitesWithData(const PluginInfoStore::Plugin&, WebPluginSiteDataManager*, uint64_t callbackID);
void clearSiteData(const PluginInfoStore::Plugin&, WebPluginSiteDataManager*, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
private:
PluginProcessManager();
PluginProcessProxy* getOrCreatePluginProcess(const PluginInfoStore::Plugin&);
Vector<PluginProcessProxy*> m_pluginProcesses;
};
......
......@@ -34,6 +34,7 @@
#include "PluginProcessMessages.h"
#include "RunLoop.h"
#include "WebCoreArgumentCoders.h"
#include "WebPluginSiteDataManager.h"
#include "WebProcessProxy.h"
namespace WebKit {
......@@ -80,6 +81,39 @@ void PluginProcessProxy::createWebProcessConnection(WebProcessProxy* webProcessP
m_connection->send(Messages::PluginProcess::CreateWebProcessConnection(), 0, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
}
void PluginProcessProxy::getSitesWithData(WebPluginSiteDataManager* webPluginSiteDataManager, uint64_t callbackID)
{
ASSERT(!m_pendingGetSitesReplies.contains(callbackID));
m_pendingGetSitesReplies.set(callbackID, webPluginSiteDataManager);
if (m_processLauncher->isLaunching()) {
m_pendingGetSitesRequests.append(callbackID);
return;
}
// Ask the plug-in process for the sites with data.
m_connection->send(Messages::PluginProcess::GetSitesWithData(callbackID), 0);
}
void PluginProcessProxy::clearSiteData(WebPluginSiteDataManager* webPluginSiteDataManager, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
{
ASSERT(!m_pendingClearSiteDataReplies.contains(callbackID));
m_pendingClearSiteDataReplies.set(callbackID, webPluginSiteDataManager);
if (m_processLauncher->isLaunching()) {
ClearSiteDataRequest request;
request.sites = sites;
request.flags = flags;
request.maxAgeInSeconds = maxAgeInSeconds;
request.callbackID = callbackID;
m_pendingClearSiteDataRequests.append(request);
return;
}
// Ask the plug-in process to clear the site data.
m_connection->send(Messages::PluginProcess::ClearSiteData(sites, flags, maxAgeInSeconds, callbackID), 0);
}
void PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch()
{
// The plug-in process must have crashed or exited, send any pending sync replies we might have.
......@@ -93,6 +127,12 @@ void PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch()
replyWebProcessProxy->connection()->sendSyncReply(reply);
}
while (!m_pendingGetSitesReplies.isEmpty())
didGetSitesWithData(Vector<String>(), m_pendingGetSitesReplies.begin()->first);
while (!m_pendingClearSiteDataReplies.isEmpty())
didClearSiteData(m_pendingClearSiteDataReplies.begin()->first);
// Tell the plug-in process manager to forget about this plug-in process proxy.
m_pluginProcessManager->removePluginProcessProxy(this);
delete this;
......@@ -134,6 +174,16 @@ void PluginProcessProxy::didFinishLaunching(ProcessLauncher*, CoreIPC::Connectio
m_connection->send(Messages::PluginProcess::InitializePluginProcess(parameters), 0);
// Send all our pending requests.
for (size_t i = 0; i < m_pendingGetSitesRequests.size(); ++i)
m_connection->send(Messages::PluginProcess::GetSitesWithData(m_pendingGetSitesRequests[i]), 0);
m_pendingGetSitesRequests.clear();
for (size_t i = 0; i < m_pendingClearSiteDataRequests.size(); ++i) {
const ClearSiteDataRequest& request = m_pendingClearSiteDataRequests[i];
m_connection->send(Messages::PluginProcess::ClearSiteData(request.sites, request.flags, request.maxAgeInSeconds, request.callbackID), 0);
}
m_pendingClearSiteDataRequests.clear();
for (unsigned i = 0; i < m_numPendingConnectionRequests; ++i)
m_connection->send(Messages::PluginProcess::CreateWebProcessConnection(), 0);
......@@ -154,6 +204,22 @@ void PluginProcessProxy::didCreateWebProcessConnection(const CoreIPC::MachPort&
replyWebProcessProxy->connection()->sendSyncReply(reply);
}
void PluginProcessProxy::didGetSitesWithData(const Vector<String>& sites, uint64_t callbackID)
{
RefPtr<WebPluginSiteDataManager> webPluginSiteDataManager = m_pendingGetSitesReplies.take(callbackID);
ASSERT(webPluginSiteDataManager);
webPluginSiteDataManager->didGetSitesWithDataForSinglePlugin(sites, callbackID);
}
void PluginProcessProxy::didClearSiteData(uint64_t callbackID)
{
RefPtr<WebPluginSiteDataManager> webPluginSiteDataManager = m_pendingClearSiteDataReplies.take(callbackID);
ASSERT(webPluginSiteDataManager);
webPluginSiteDataManager->didClearSiteDataForSinglePlugin(callbackID);
}
} // namespace WebKit
#endif // ENABLE(PLUGIN_PROCESS)
......@@ -41,6 +41,7 @@ namespace CoreIPC {
namespace WebKit {
class PluginProcessManager;
class WebPluginSiteDataManager;
class WebProcessProxy;
struct PluginProcessCreationParameters;
......@@ -54,7 +55,13 @@ public:
// Asks the plug-in process to create a new connection to a web process. The connection identifier will be
// encoded in the given argument encoder and sent back to the connection of the given web process.
void createWebProcessConnection(WebProcessProxy*, CoreIPC::ArgumentEncoder* reply);
// Asks the plug-in process to get a list of domains for which the plug-in has data stored.
void getSitesWithData(WebPluginSiteDataManager*, uint64_t callbackID);
// Asks the plug-in process to clear the data for the given sites.
void clearSiteData(WebPluginSiteDataManager*, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
private:
PluginProcessProxy(PluginProcessManager*, const PluginInfoStore::Plugin&);
......@@ -71,6 +78,8 @@ private:
// Message handlers
void didReceivePluginProcessProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void didCreateWebProcessConnection(const CoreIPC::MachPort&);
void didGetSitesWithData(const Vector<String>& sites, uint64_t callbackID);
void didClearSiteData(uint64_t callbackID);
void platformInitializePluginProcess(PluginProcessCreationParameters& parameters);
......@@ -88,10 +97,21 @@ private:
Deque<std::pair<RefPtr<WebProcessProxy>, CoreIPC::ArgumentEncoder*> > m_pendingConnectionReplies;
Vector<uint64_t> m_pendingGetSitesRequests;
HashMap<uint64_t, RefPtr<WebPluginSiteDataManager> > m_pendingGetSitesReplies;
struct ClearSiteDataRequest {
Vector<String> sites;
uint64_t flags;
uint64_t maxAgeInSeconds;
uint64_t callbackID;
};
Vector<ClearSiteDataRequest> m_pendingClearSiteDataRequests;
HashMap<uint64_t, RefPtr<WebPluginSiteDataManager> > m_pendingClearSiteDataReplies;
// If createPluginConnection is called while the process is still launching we'll keep count of it and send a bunch of requests
// when the process finishes launching.
unsigned m_numPendingConnectionRequests;
};
} // namespace WebKit
......
......@@ -25,6 +25,9 @@
messages -> PluginProcessProxy {
# FIXME: This is platform specific
DidCreateWebProcessConnection(CoreIPC::MachPort connectionIdentifier)
DidGetSitesWithData(Vector<WTF::String> sites, uint64_t callbackID)
DidClearSiteData(uint64_t callbackID)
}
#endif
......@@ -27,6 +27,7 @@
#include "WebPluginSiteDataManager.h"
#include "ImmutableArray.h"
#include "PluginProcessManager.h"
#include "WebContext.h"
#include "WebProcessMessages.h"
......@@ -34,6 +35,83 @@ using namespace WebCore;
namespace WebKit {
#if ENABLE(PLUGIN_PROCESS)
class WebPluginSiteDataManager::GetSitesWithDataState {
public:
explicit GetSitesWithDataState(WebPluginSiteDataManager* webPluginSiteDataManager, uint64_t callbackID)
: m_webPluginSiteDataManager(webPluginSiteDataManager)
, m_callbackID(callbackID)
, m_plugins(webPluginSiteDataManager->m_webContext->pluginInfoStore()->plugins())
{
}
void getSitesWithDataForNextPlugin()
{
if (m_plugins.isEmpty()) {
Vector<String> sites;
copyToVector(m_sites, sites);
m_webPluginSiteDataManager->didGetSitesWithDataForAllPlugins(sites, m_callbackID);
return;
}
PluginProcessManager::shared().getSitesWithData(m_plugins.last(), m_webPluginSiteDataManager, m_callbackID);
m_plugins.removeLast();
}
void didGetSitesWithDataForSinglePlugin(const Vector<String>& sites)
{
for (size_t i = 0; i < sites.size(); ++i)
m_sites.add(sites[i]);
getSitesWithDataForNextPlugin();
}
private:
WebPluginSiteDataManager* m_webPluginSiteDataManager;
uint64_t m_callbackID;
Vector<PluginInfoStore::Plugin> m_plugins;
HashSet<String> m_sites;
};
class WebPluginSiteDataManager::ClearSiteDataState {
public:
explicit ClearSiteDataState(WebPluginSiteDataManager* webPluginSiteDataManager, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
: m_webPluginSiteDataManager(webPluginSiteDataManager)
, m_sites(sites)
, m_flags(flags)
, m_maxAgeInSeconds(maxAgeInSeconds)
, m_callbackID(callbackID)
, m_plugins(webPluginSiteDataManager->m_webContext->pluginInfoStore()->plugins())
{
}
void clearSiteDataForNextPlugin()
{
if (m_plugins.isEmpty()) {
m_webPluginSiteDataManager->didClearSiteDataForAllPlugins(m_callbackID);
return;
}
PluginProcessManager::shared().clearSiteData(m_plugins.last(), m_webPluginSiteDataManager, m_sites, m_flags, m_maxAgeInSeconds, m_callbackID);
m_plugins.removeLast();
}
void didClearSiteDataForSinglePlugin()
{
clearSiteDataForNextPlugin();
}
private:
WebPluginSiteDataManager* m_webPluginSiteDataManager;
Vector<String> m_sites;
uint64_t m_flags;
uint64_t m_maxAgeInSeconds;
uint64_t m_callbackID;
Vector<PluginInfoStore::Plugin> m_plugins;
};
#endif // ENABLE(PLUGIN_PROCESS)
PassRefPtr<WebPluginSiteDataManager> WebPluginSiteDataManager::create(WebContext* webContext)
{
return adoptRef(new WebPluginSiteDataManager(webContext));
......@@ -46,11 +124,24 @@ WebPluginSiteDataManager::WebPluginSiteDataManager(WebContext* webContext)
WebPluginSiteDataManager::~WebPluginSiteDataManager()
{
ASSERT(m_arrayCallbacks.isEmpty());
ASSERT(m_voidCallbacks.isEmpty());
#if ENABLE(PLUGIN_PROCESS)
ASSERT(m_pendingGetSitesWithData.isEmpty());
ASSERT(m_pendingClearSiteData.isEmpty());
#endif
}
void WebPluginSiteDataManager::invalidate()
{
invalidateCallbackMap(m_arrayCallbacks);
#if ENABLE(PLUGIN_PROCESS)
</