WebKit2: Make sure to try to terminate the Web Process when any work that might requi...
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 16:48:48 +0000 (16:48 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 16:48:48 +0000 (16:48 +0000)
commitf245a1539f1ff58297e8103411adfea9454b7b7d
treeb223d6fd71aeb40484d239caf8fd331ee4c7cab0
parentae262146ed334ccc1e80de8ae26cd0753a57d179
WebKit2: Make sure to try to terminate the Web Process when any work that might require the
Web Process to be relaunched is done
https://bugs.webkit.org/show_bug.cgi?id=57462

Reviewed by Anders Carlsson.

For the ManagerProxies in the UIProcess, only return true from shouldTerminate if there are
no more callbacks waiting to be invoked.

For the the Managers in the WebProcess, call WebProcess::shared().terminateIfPossible() when
any work called for by a ManagerProxy function that called relaunchProcessIfNecessary is
finished.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::shouldTerminate):
Check with each of the ManagerProxies.

* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::shouldTerminate):
* UIProcess/WebApplicationCacheManagerProxy.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::shouldTerminate):
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::shouldTerminate):
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebKeyValueStorageManagerProxy.cpp:
(WebKit::WebKeyValueStorageManagerProxy::shouldTerminate):
* UIProcess/WebKeyValueStorageManagerProxy.h:
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::shouldTerminate):
* UIProcess/WebMediaCacheManagerProxy.h:
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::shouldTerminate):
* UIProcess/WebResourceCacheManagerProxy.h:

* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
(WebKit::WebApplicationCacheManager::deleteAllEntries):
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::getHostnamesWithCookies):
(WebKit::WebCookieManager::deleteCookiesForHostname):
(WebKit::WebCookieManager::deleteAllCookies):
(WebKit::WebCookieManager::startObservingCookieChanges):
(WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
* WebProcess/MediaCache/WebMediaCacheManager.cpp:
(WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
(WebKit::WebMediaCacheManager::clearCacheForHostname):
(WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::getCacheOrigins):
(WebKit::WebResourceCacheManager::clearCacheForOrigin):
(WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::getDatabasesByOrigin):
(WebKit::WebDatabaseManager::getDatabaseOrigins):
(WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManager::deleteAllDatabases):
(WebKit::WebDatabaseManager::setQuotaForOrigin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp
Source/WebKit2/UIProcess/WebCookieManagerProxy.h
Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp
Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h
Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h
Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp
Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp
Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp
Source/WebKit2/WebProcess/MediaCache/WebMediaCacheManager.cpp
Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp