[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
beidson at apple.com
beidson at apple.com
Wed Dec 22 17:58:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b8f9b67d09a13521626f2bdf3710a4c5519e3496
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 3 22:06:14 2010 +0000
<rdar://problem/8725679> and https://bugs.webkit.org/show_bug.cgi?id=50482
Crash trying to empty caches with no WebProcess.
Reviewed by Sam Weinig.
* Shared/WebProcessCreationParameters.h: Add the "clear this cache" flags.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::ensureWebProcess): If either of the clear cache flags are set when a new WebProcess is
created, include those flags in the parameters.
(WebKit::WebContext::clearResourceCaches): If the current process isn't valid, flag this action to be done later.
(WebKit::WebContext::clearApplicationCache): Ditto.
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Clear the caches if told to.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2b5f99f..114b78b 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,23 @@
+2010-12-03 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/8725679> and https://bugs.webkit.org/show_bug.cgi?id=50482
+ Crash trying to empty caches with no WebProcess.
+
+ * Shared/WebProcessCreationParameters.h: Add the "clear this cache" flags.
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::WebContext):
+ (WebKit::WebContext::ensureWebProcess): If either of the clear cache flags are set when a new WebProcess is
+ created, include those flags in the parameters.
+ (WebKit::WebContext::clearResourceCaches): If the current process isn't valid, flag this action to be done later.
+ (WebKit::WebContext::clearApplicationCache): Ditto.
+ * UIProcess/WebContext.h:
+
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::initializeWebProcess): Clear the caches if told to.
+
2010-12-03 Sam Weinig <sam at webkit.org>
Reviewed by Gavin Barraclough.
diff --git a/WebKit2/Shared/WebProcessCreationParameters.h b/WebKit2/Shared/WebProcessCreationParameters.h
index d4640b8..4bd2a7b 100644
--- a/WebKit2/Shared/WebProcessCreationParameters.h
+++ b/WebKit2/Shared/WebProcessCreationParameters.h
@@ -58,6 +58,9 @@ struct WebProcessCreationParameters {
CacheModel cacheModel;
bool shouldTrackVisitedLinks;
+
+ bool clearResourceCaches;
+ bool clearApplicationCache;
String languageCode;
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index 5d071f1..6419c6c 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -82,6 +82,8 @@ WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
, m_injectedBundlePath(injectedBundlePath)
, m_visitedLinkProvider(this)
, m_cacheModel(CacheModelDocumentViewer)
+ , m_clearResourceCachesForNewWebProcess(false)
+ , m_clearApplicationCacheForNewWebProcess(false)
#if PLATFORM(WIN)
, m_shouldPaintNativeControls(true)
#endif
@@ -159,7 +161,12 @@ void WebContext::ensureWebProcess()
parameters.cacheModel = m_cacheModel;
parameters.languageCode = defaultLanguage();
parameters.applicationCacheDirectory = applicationCacheDirectory();
-
+ parameters.clearResourceCaches = m_clearResourceCachesForNewWebProcess;
+ parameters.clearApplicationCache = m_clearApplicationCacheForNewWebProcess;
+
+ m_clearResourceCachesForNewWebProcess = false;
+ m_clearApplicationCacheForNewWebProcess = false;
+
copyToVector(m_schemesToRegisterAsEmptyDocument, parameters.urlSchemesRegistererdAsEmptyDocument);
copyToVector(m_schemesToRegisterAsSecure, parameters.urlSchemesRegisteredAsSecure);
copyToVector(m_schemesToSetDomainRelaxationForbiddenFor, parameters.urlSchemesForWhichDomainRelaxationIsForbidden);
@@ -472,11 +479,27 @@ CoreIPC::SyncReplyMode WebContext::didReceiveSyncMessage(CoreIPC::Connection* co
void WebContext::clearResourceCaches()
{
+ if (!hasValidProcess()) {
+ // FIXME <rdar://problem/8727879>: Setting this flag ensures that the next time a WebProcess is created, this request to
+ // clear the resource cache will be respected. But if the user quits the application before another WebProcess is created,
+ // their request will be ignored.
+ m_clearResourceCachesForNewWebProcess = true;
+ return;
+ }
+
m_process->send(Messages::WebProcess::ClearResourceCaches(), 0);
}
void WebContext::clearApplicationCache()
{
+ if (!hasValidProcess()) {
+ // FIXME <rdar://problem/8727879>: Setting this flag ensures that the next time a WebProcess is created, this request to
+ // clear the application cache will be respected. But if the user quits the application before another WebProcess is created,
+ // their request will be ignored.
+ m_clearApplicationCacheForNewWebProcess = true;
+ return;
+ }
+
m_process->send(Messages::WebProcess::ClearApplicationCache(), 0);
}
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index 617c62c..6a26c64 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -177,6 +177,9 @@ private:
WebDownloadClient m_downloadClient;
HashMap<uint64_t, RefPtr<DownloadProxy> > m_downloads;
+ bool m_clearResourceCachesForNewWebProcess;
+ bool m_clearApplicationCacheForNewWebProcess;
+
#if PLATFORM(WIN)
bool m_shouldPaintNativeControls;
#endif
diff --git a/WebKit2/WebProcess/WebProcess.cpp b/WebKit2/WebProcess/WebProcess.cpp
index b572dac..511805a 100644
--- a/WebKit2/WebProcess/WebProcess.cpp
+++ b/WebKit2/WebProcess/WebProcess.cpp
@@ -158,6 +158,11 @@ void WebProcess::initializeWebProcess(const WebProcessCreationParameters& parame
for (size_t i = 0; i < parameters.urlSchemesForWhichDomainRelaxationIsForbidden.size(); ++i)
setDomainRelaxationForbiddenForURLScheme(parameters.urlSchemesForWhichDomainRelaxationIsForbidden[i]);
+ if (parameters.clearResourceCaches)
+ clearResourceCaches();
+ if (parameters.clearApplicationCache)
+ clearApplicationCache();
+
#if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
m_compositingRenderServerPort = parameters.acceleratedCompositingPort.port();
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list