WebKit Bugzilla
Attachment 362452 Details for
Bug 194842
: Move API::HTTPCookieStore ownership from API::WebsiteDataStore to WebKit::WebsiteDataStore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194842-20190219164242.patch (text/plain), 5.54 KB, created by
Alex Christensen
on 2019-02-19 16:42:43 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-02-19 16:42:43 PST
Size:
5.54 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 241784) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2019-02-19 Alex Christensen <achristensen@webkit.org> >+ >+ Move API::HTTPCookieStore ownership from API::WebsiteDataStore to WebKit::WebsiteDataStore >+ https://bugs.webkit.org/show_bug.cgi?id=194842 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We need a way to get from WebKit::WebsiteDataStore to API::HTTPCookieStore. It can't be done before this. >+ This made an existing reference cycle easier to see, and we should fix it in a followup patch. >+ >+ * UIProcess/API/APIWebsiteDataStore.cpp: >+ (API::WebsiteDataStore::httpCookieStore): >+ * UIProcess/API/APIWebsiteDataStore.h: >+ * UIProcess/WebsiteData/WebsiteDataStore.cpp: >+ (WebKit::WebsiteDataStore::cookieStore): >+ * UIProcess/WebsiteData/WebsiteDataStore.h: >+ > 2019-02-19 Antti Koivisto <antti@apple.com> > > Pass rootContentsLayer to Mac remote layer tree >Index: Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp (revision 241753) >+++ Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp (working copy) >@@ -37,8 +37,8 @@ using namespace WebKit; > > namespace API { > >-HTTPCookieStore::HTTPCookieStore(WebsiteDataStore& websiteDataStore) >- : m_owningDataStore(websiteDataStore.websiteDataStore()) >+HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore& websiteDataStore) >+ : m_owningDataStore(websiteDataStore) > { > if (!m_owningDataStore->processPoolForCookieStorageOperations()) > registerForNewProcessPoolNotifications(); >Index: Source/WebKit/UIProcess/API/APIHTTPCookieStore.h >=================================================================== >--- Source/WebKit/UIProcess/API/APIHTTPCookieStore.h (revision 241753) >+++ Source/WebKit/UIProcess/API/APIHTTPCookieStore.h (working copy) >@@ -51,7 +51,7 @@ class WebsiteDataStore; > > class HTTPCookieStore final : public ObjectImpl<Object::Type::HTTPCookieStore> { > public: >- static Ref<HTTPCookieStore> create(WebsiteDataStore& websiteDataStore) >+ static Ref<HTTPCookieStore> create(WebKit::WebsiteDataStore& websiteDataStore) > { > return adoptRef(*new HTTPCookieStore(websiteDataStore)); > } >@@ -75,7 +75,7 @@ public: > void cookieManagerDestroyed(); > > private: >- HTTPCookieStore(WebsiteDataStore&); >+ HTTPCookieStore(WebKit::WebsiteDataStore&); > > void registerForNewProcessPoolNotifications(); > void unregisterForNewProcessPoolNotifications(); >@@ -87,6 +87,7 @@ private: > void startObservingChangesToDefaultUIProcessCookieStore(Function<void()>&&); > void stopObservingChangesToDefaultUIProcessCookieStore(); > >+ // FIXME: This is a reference cycle. > Ref<WebKit::WebsiteDataStore> m_owningDataStore; > HashSet<Observer*> m_observers; > >Index: Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp (revision 241753) >+++ Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp (working copy) >@@ -85,10 +85,7 @@ WebsiteDataStore::~WebsiteDataStore() > > HTTPCookieStore& WebsiteDataStore::httpCookieStore() > { >- if (!m_apiHTTPCookieStore) >- m_apiHTTPCookieStore = HTTPCookieStore::create(*this); >- >- return *m_apiHTTPCookieStore; >+ return m_websiteDataStore->cookieStore(); > } > > bool WebsiteDataStore::isPersistent() >Index: Source/WebKit/UIProcess/API/APIWebsiteDataStore.h >=================================================================== >--- Source/WebKit/UIProcess/API/APIWebsiteDataStore.h (revision 241753) >+++ Source/WebKit/UIProcess/API/APIWebsiteDataStore.h (working copy) >@@ -91,7 +91,6 @@ private: > static WTF::String websiteDataDirectoryFileSystemRepresentation(const WTF::String& directoryName); > > Ref<WebKit::WebsiteDataStore> m_websiteDataStore; >- RefPtr<HTTPCookieStore> m_apiHTTPCookieStore; > }; > > } >Index: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (revision 241753) >+++ Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (working copy) >@@ -2097,6 +2097,14 @@ void WebsiteDataStore::setMockWebAuthent > } > #endif > >+API::HTTPCookieStore& WebsiteDataStore::cookieStore() >+{ >+ if (!m_cookieStore) >+ m_cookieStore = API::HTTPCookieStore::create(*this); >+ >+ return *m_cookieStore; >+} >+ > void WebsiteDataStore::didCreateNetworkProcess() > { > } >Index: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >=================================================================== >--- Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (revision 241753) >+++ Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (working copy) >@@ -56,6 +56,10 @@ > #include <WebKitAdditions/WebsiteDataStoreAdditions.h> > #endif > >+namespace API { >+class HTTPCookieStore; >+} >+ > namespace WebCore { > class SecurityOrigin; > } >@@ -229,6 +233,8 @@ public: > WebsiteDataStoreClient& client() { return m_client.get(); } > void setClient(UniqueRef<WebsiteDataStoreClient>&& client) { m_client = WTFMove(client); } > >+ API::HTTPCookieStore& cookieStore(); >+ > #if HAVE(LOAD_OPTIMIZER) > WEBSITEDATASTORE_LOADOPTIMIZER_ADDITIONS_1 > #endif >@@ -309,6 +315,8 @@ private: > #endif > > UniqueRef<WebsiteDataStoreClient> m_client; >+ >+ RefPtr<API::HTTPCookieStore> m_cookieStore; > }; > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ggaren
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194842
: 362452