Changeset 176698 in webkit
- Timestamp:
- Dec 2, 2014 4:33:29 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r176697 r176698 1 2014-12-02 Alexey Proskuryakov <ap@apple.com> 2 3 http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests 4 https://bugs.webkit.org/show_bug.cgi?id=139149 5 6 Reviewed by Anders Carlsson. 7 8 * WebCore.exp.in: Added ApplicationCache::deleteAllCaches. 9 10 * loader/appcache/ApplicationCache.h: 11 * loader/appcache/ApplicationCache.cpp: 12 (WebCore::ApplicationCache::deleteAllCaches): Added. 13 14 * loader/appcache/ApplicationCacheStorage.cpp: 15 (WebCore::ApplicationCacheStorage::getManifestURLs): Removed logging. It is OK to 16 have this function called when there is no database file. 17 18 * loader/appcache/ApplicationCacheStorage.h: Renamed manifestURLs to getManifestURLs, 19 because WebKit style. 20 1 21 2014-12-02 Tim Horton <timothy_horton@apple.com> 2 22 -
trunk/Source/WebCore/WebCore.exp.in
r176697 r176698 681 681 __ZN7WebCore15visitedLinkHashEPKtj 682 682 __ZN7WebCore15visitedLinkHashERKN3WTF6StringE 683 __ZN7WebCore16ApplicationCache15deleteAllCachesEv 683 684 __ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE 684 685 __ZN7WebCore16ApplicationCache20deleteCacheForOriginEPNS_14SecurityOriginE -
trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp
r170113 r176698 194 194 { 195 195 Vector<URL> urls; 196 if (!cacheStorage(). manifestURLs(&urls)) {196 if (!cacheStorage().getManifestURLs(&urls)) { 197 197 LOG_ERROR("Failed to retrieve ApplicationCache manifest URLs"); 198 198 return; … … 213 213 } 214 214 215 void ApplicationCache::deleteAllCaches() 216 { 217 HashSet<RefPtr<SecurityOrigin>> origins; 218 219 cacheStorage().getOriginsWithCache(origins); 220 for (auto& origin : origins) 221 deleteCacheForOrigin(origin.get()); 222 223 cacheStorage().vacuumDatabaseFile(); 224 } 225 215 226 int64_t ApplicationCache::diskUsageForOrigin(SecurityOrigin* origin) 216 227 { -
trunk/Source/WebCore/loader/appcache/ApplicationCache.h
r172814 r176698 50 50 51 51 WEBCORE_EXPORT static void deleteCacheForOrigin(SecurityOrigin*); 52 52 WEBCORE_EXPORT static void deleteAllCaches(); 53 53 54 ~ApplicationCache(); 54 55 -
trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
r176172 r176698 1373 1373 } 1374 1374 1375 bool ApplicationCacheStorage:: manifestURLs(Vector<URL>* urls)1375 bool ApplicationCacheStorage::getManifestURLs(Vector<URL>* urls) 1376 1376 { 1377 1377 SQLiteTransactionInProgressAutoCounter transactionCounter; … … 1563 1563 { 1564 1564 Vector<URL> urls; 1565 if (!manifestURLs(&urls)) { 1566 LOG_ERROR("Failed to retrieve ApplicationCache manifest URLs"); 1567 return; 1568 } 1565 getManifestURLs(&urls); 1569 1566 1570 1567 // Multiple manifest URLs might share the same SecurityOrigin, so we might be creating extra, wasted origins here. … … 1583 1580 } 1584 1581 1585 ApplicationCacheStorage::ApplicationCacheStorage() 1582 ApplicationCacheStorage::ApplicationCacheStorage() 1586 1583 : m_maximumSize(ApplicationCacheStorage::noQuota()) 1587 1584 , m_isMaximumSizeReached(false) -
trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h
r172849 r176698 90 90 static bool WEBCORE_EXPORT storeCopyOfCache(const String& cacheDirectory, ApplicationCacheHost*); 91 91 92 bool manifestURLs(Vector<URL>* urls);92 bool getManifestURLs(Vector<URL>* urls); 93 93 bool cacheGroupSize(const String& manifestURL, int64_t* size); 94 94 bool deleteCacheGroup(const String& manifestURL); -
trunk/Source/WebKit/mac/ChangeLog
r176697 r176698 1 2014-12-02 Alexey Proskuryakov <ap@apple.com> 2 3 http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests 4 https://bugs.webkit.org/show_bug.cgi?id=139149 5 6 Reviewed by Anders Carlsson. 7 8 This changes API behavior. I think that it's OK, because existing behavior made no sense. 9 We used to delete caches from disk, but they were still active in memory. Now we also 10 obsolete them in memory, so documents that use a cache still work, but new ones don't 11 pick one up. 12 13 * WebCoreSupport/WebApplicationCache.mm: 14 (+[WebApplicationCache setMaximumSize:]): Changing maximum on-disk size doesn't 15 need to delete in-momry caches too. Keep existing behavior. 16 (+[WebApplicationCache deleteAllApplicationCaches]): Use the new WebCore function 17 that properly deletes caches. 18 1 19 2014-12-02 Tim Horton <timothy_horton@apple.com> 2 20 -
trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
r161185 r176698 67 67 + (void)setMaximumSize:(long long)size 68 68 { 69 [WebApplicationCache deleteAllApplicationCaches];69 cacheStorage().deleteAllEntries(); 70 70 cacheStorage().setMaximumSize(size); 71 71 } … … 88 88 + (void)deleteAllApplicationCaches 89 89 { 90 cacheStorage().deleteAllEntries();90 ApplicationCache::deleteAllCaches(); 91 91 } 92 92 -
trunk/Source/WebKit2/ChangeLog
r176697 r176698 1 2014-12-02 Alexey Proskuryakov <ap@apple.com> 2 3 http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests 4 https://bugs.webkit.org/show_bug.cgi?id=139149 5 6 Reviewed by Anders Carlsson. 7 8 This changes API behavior. I think that it's OK, because existing behavior made no sense. 9 We used to delete caches from disk, but they were still active in memory. Now we also 10 obsolete them in memory, so documents that use a cache still work, but new ones don't 11 pick one up. 12 13 * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: 14 (WebKit::WebApplicationCacheManager::deleteAllEntries): Use the new WebCore function 15 that properly deletes caches. 16 1 17 2014-12-02 Tim Horton <timothy_horton@apple.com> 2 18 -
trunk/Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp
r160464 r176698 88 88 void WebApplicationCacheManager::deleteAllEntries() 89 89 { 90 cacheStorage().deleteAllEntries();90 ApplicationCache::deleteAllCaches(); 91 91 } 92 92 -
trunk/Tools/ChangeLog
r176683 r176698 1 2014-12-02 Alexey Proskuryakov <ap@apple.com> 2 3 http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests 4 https://bugs.webkit.org/show_bug.cgi?id=139149 5 6 Reviewed by Anders Carlsson. 7 8 WebKit2 already cleared application caches between runs (although it wasn't entirely 9 effective without WebCore changes in this patch). 10 11 * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): Clear applicaiton caches between runs. 12 13 * DumpRenderTree/win/DumpRenderTree.cpp: (runTest): Ditto (unfortunately, this 14 function is not implemented on Windows, see below). 15 16 * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::clearAllApplicationCaches): 17 Ameded a FIXME. 18 1 19 2014-12-02 Gavin Barraclough <barraclough@apple.com> 2 20 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r176677 r176698 1871 1871 sizeWebViewForCurrentTest(); 1872 1872 gTestRunner->setIconDatabaseEnabled(false); 1873 gTestRunner->clearAllApplicationCaches(); 1873 1874 1874 1875 if (disallowedURLs) -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r176677 r176698 1020 1020 sizeWebViewForCurrentTest(); 1021 1021 gTestRunner->setIconDatabaseEnabled(false); 1022 gTestRunner->clearAllApplicationCaches(); 1022 1023 1023 1024 if (shouldLogFrameLoadDelegates(pathOrURL.c_str())) -
trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp
r172977 r176698 751 751 void TestRunner::clearAllApplicationCaches() 752 752 { 753 // FIXME: Implement to support application cache quotas .753 // FIXME: Implement to support application cache quotas, and to make testing more reliable (see <https://bugs.webkit.org/show_bug.cgi?id=139149>). 754 754 } 755 755
Note: See TracChangeset
for help on using the changeset viewer.