Title: [141510] trunk/Source/WebKit2
- Revision
- 141510
- Author
- [email protected]
- Date
- 2013-01-31 17:16:02 -0800 (Thu, 31 Jan 2013)
Log Message
StorageManager should be ref-counted
https://bugs.webkit.org/show_bug.cgi?id=108553
Reviewed by Beth Dakin.
It's likely we'd want to have the storage manager outlive its context at times, so make it
reference counted.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::create):
(WebKit):
* UIProcess/Storage/StorageManager.h:
(StorageManager):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/WebContext.h:
(WebContext):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (141509 => 141510)
--- trunk/Source/WebKit2/ChangeLog 2013-02-01 01:12:22 UTC (rev 141509)
+++ trunk/Source/WebKit2/ChangeLog 2013-02-01 01:16:02 UTC (rev 141510)
@@ -1,5 +1,25 @@
2013-01-31 Anders Carlsson <[email protected]>
+ StorageManager should be ref-counted
+ https://bugs.webkit.org/show_bug.cgi?id=108553
+
+ Reviewed by Beth Dakin.
+
+ It's likely we'd want to have the storage manager outlive its context at times, so make it
+ reference counted.
+
+ * UIProcess/Storage/StorageManager.cpp:
+ (WebKit::StorageManager::create):
+ (WebKit):
+ * UIProcess/Storage/StorageManager.h:
+ (StorageManager):
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::WebContext):
+ * UIProcess/WebContext.h:
+ (WebContext):
+
+2013-01-31 Anders Carlsson <[email protected]>
+
WorkQueue should be a ref-counted class
https://bugs.webkit.org/show_bug.cgi?id=108544
Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp (141509 => 141510)
--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp 2013-02-01 01:12:22 UTC (rev 141509)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp 2013-02-01 01:16:02 UTC (rev 141510)
@@ -28,6 +28,11 @@
namespace WebKit {
+PassRefPtr<StorageManager> StorageManager::create()
+{
+ return adoptRef(new StorageManager);
+}
+
StorageManager::StorageManager()
{
}
Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h (141509 => 141510)
--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h 2013-02-01 01:12:22 UTC (rev 141509)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h 2013-02-01 01:16:02 UTC (rev 141510)
@@ -26,14 +26,18 @@
#ifndef StorageManager_h
#define StorageManager_h
+#include <wtf/PassRefPtr.h>
+#include <wtf/ThreadSafeRefCounted.h>
+
namespace WebKit {
-class StorageManager {
+class StorageManager : public ThreadSafeRefCounted<StorageManager> {
public:
- StorageManager();
+ static PassRefPtr<StorageManager> create();
~StorageManager();
private:
+ StorageManager();
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (141509 => 141510)
--- trunk/Source/WebKit2/UIProcess/WebContext.cpp 2013-02-01 01:12:22 UTC (rev 141509)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp 2013-02-01 01:16:02 UTC (rev 141510)
@@ -134,6 +134,7 @@
, m_cacheModel(CacheModelDocumentViewer)
, m_memorySamplerEnabled(false)
, m_memorySamplerInterval(1400.0)
+ , m_storageManager(StorageManager::create())
#if USE(SOUP)
, m_initialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain)
#endif
Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (141509 => 141510)
--- trunk/Source/WebKit2/UIProcess/WebContext.h 2013-02-01 01:12:22 UTC (rev 141509)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h 2013-02-01 01:16:02 UTC (rev 141510)
@@ -422,7 +422,7 @@
RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
#endif
- StorageManager m_storageManager;
+ RefPtr<StorageManager> m_storageManager;
typedef HashMap<AtomicString, RefPtr<WebContextSupplement> > WebContextSupplementMap;
WebContextSupplementMap m_supplements;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes