Title: [199849] trunk/Source/WebCore
- Revision
- 199849
- Author
- ander...@apple.com
- Date
- 2016-04-21 17:18:48 -0700 (Thu, 21 Apr 2016)
Log Message
Get rid of ApplicationCacheStorage::singleton
https://bugs.webkit.org/show_bug.cgi?id=156882
Reviewed by Tim Horton.
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::setCacheDirectory): Deleted.
(WebCore::ApplicationCacheStorage::singleton): Deleted.
* loader/appcache/ApplicationCacheStorage.h:
* page/Page.cpp:
(WebCore::Page::Page):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (199848 => 199849)
--- trunk/Source/WebCore/ChangeLog 2016-04-22 00:09:36 UTC (rev 199848)
+++ trunk/Source/WebCore/ChangeLog 2016-04-22 00:18:48 UTC (rev 199849)
@@ -1,3 +1,17 @@
+2016-04-21 Anders Carlsson <ander...@apple.com>
+
+ Get rid of ApplicationCacheStorage::singleton
+ https://bugs.webkit.org/show_bug.cgi?id=156882
+
+ Reviewed by Tim Horton.
+
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::setCacheDirectory): Deleted.
+ (WebCore::ApplicationCacheStorage::singleton): Deleted.
+ * loader/appcache/ApplicationCacheStorage.h:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+
2016-04-21 Simon Fraser <simon.fra...@apple.com>
ASSERTION FAILED: accumulation == TransformState::FlattenTransform in WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect
Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (199848 => 199849)
--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2016-04-22 00:09:36 UTC (rev 199848)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2016-04-22 00:18:48 UTC (rev 199849)
@@ -364,14 +364,6 @@
m_cacheHostSet.remove(urlHostHash(group->manifestURL()));
}
-void ApplicationCacheStorage::setCacheDirectory(const String& cacheDirectory)
-{
- ASSERT(m_cacheDirectory.isNull());
- ASSERT(!cacheDirectory.isNull());
-
- m_cacheDirectory = cacheDirectory;
-}
-
const String& ApplicationCacheStorage::cacheDirectory() const
{
return m_cacheDirectory;
@@ -1589,10 +1581,4 @@
return adoptRef(*new ApplicationCacheStorage(cacheDirectory, flatFileSubdirectoryName));
}
-ApplicationCacheStorage& ApplicationCacheStorage::singleton()
-{
- static ApplicationCacheStorage& storage = create(String(), "ApplicationCache").leakRef();
- return storage;
}
-
-} // namespace WebCore
Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h (199848 => 199849)
--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h 2016-04-22 00:09:36 UTC (rev 199848)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h 2016-04-22 00:18:48 UTC (rev 199849)
@@ -52,12 +52,8 @@
DiskOrOperationFailure
};
- // FIXME: Migrate off of this singleton and towards a world where each page has a storage.
- WEBCORE_EXPORT static ApplicationCacheStorage& singleton();
-
WEBCORE_EXPORT static Ref<ApplicationCacheStorage> create(const String& cacheDirectory, const String& flatFileSubdirectoryName);
- WEBCORE_EXPORT void setCacheDirectory(const String&);
const String& cacheDirectory() const;
WEBCORE_EXPORT void setMaximumSize(int64_t size);
@@ -142,9 +138,9 @@
void checkForDeletedResources();
long long flatFileAreaSize();
- String m_cacheDirectory;
- String m_cacheFile;
+ const String m_cacheDirectory;
const String m_flatFileSubdirectoryName;
+ String m_cacheFile;
int64_t m_maximumSize;
bool m_isMaximumSizeReached;
Modified: trunk/Source/WebCore/page/Page.cpp (199848 => 199849)
--- trunk/Source/WebCore/page/Page.cpp 2016-04-22 00:09:36 UTC (rev 199848)
+++ trunk/Source/WebCore/page/Page.cpp 2016-04-22 00:18:48 UTC (rev 199849)
@@ -228,7 +228,7 @@
#endif
, m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing.
, m_forbidPromptsDepth(0)
- , m_applicationCacheStorage(pageConfiguration.applicationCacheStorage ? *WTFMove(pageConfiguration.applicationCacheStorage) : ApplicationCacheStorage::singleton())
+ , m_applicationCacheStorage(*WTFMove(pageConfiguration.applicationCacheStorage))
, m_databaseProvider(*WTFMove(pageConfiguration.databaseProvider))
, m_storageNamespaceProvider(*WTFMove(pageConfiguration.storageNamespaceProvider))
, m_userContentProvider(*WTFMove(pageConfiguration.userContentProvider))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes