WebKit Bugzilla
Attachment 361207 Details for
Bug 194209
: REGRESSION(r240785): [SOUP] Broke cookie persistent storage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194209-20190205140243.patch (text/plain), 6.60 KB, created by
Michael Catanzaro
on 2019-02-05 12:02:44 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Catanzaro
Created:
2019-02-05 12:02:44 PST
Size:
6.60 KB
patch
obsolete
>Subversion Revision: 240971 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index cdfb385677ee7867594b71a04745732f9b4f6ce3..ba0aba2bd70efc44241daa8dc785acb171265235 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+2019-02-05 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ REGRESSION(r240785): [SOUP] Broke cookie persistent storage >+ https://bugs.webkit.org/show_bug.cgi?id=194209 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ I missed a spot when moving the persistent storage parameters from NetworkProcess to >+ NetworkSession. They have to be initialized separately for the default session. >+ >+ * UIProcess/soup/WebProcessPoolSoup.cpp: >+ (WebKit::WebProcessPool::platformInitializeNetworkProcess): >+ > 2019-02-04 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Shrink size of VM by lazily allocating IsoSubspaces for non-common types >diff --git a/Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp b/Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp >index 7852292bcf846bf8b6f6c3851bf6d0133343446b..b442f6702523e60176eec94b7c5fa38b1bec7b09 100644 >--- a/Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp >+++ b/Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp >@@ -38,6 +38,9 @@ namespace WebKit { > > void WebProcessPool::platformInitializeNetworkProcess(NetworkProcessCreationParameters& parameters) > { >+ NetworkSessionCreationParameters& defaultSessionParameters = parameters.defaultDataStoreParameters.networkSessionParameters; >+ supplement<WebCookieManagerProxy>()->getCookiePersistentStorage(defaultSessionParameters.sessionID, defaultSessionParameters.cookiePersistentStoragePath, defaultSessionParameters.cookiePersistentStorageType); >+ > parameters.cookieAcceptPolicy = m_initialHTTPCookieAcceptPolicy; > parameters.ignoreTLSErrors = m_ignoreTLSErrors; > parameters.languages = userPreferredLanguages(); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index b7b9d2356ccbe9e80ceb701d16d61eeac3fb74b9..57fe71d9ece2bb540c56724fef70f1324314c783 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2019-02-05 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ REGRESSION(r240785): [SOUP] Broke cookie persistent storage >+ https://bugs.webkit.org/show_bug.cgi?id=194209 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Enhance TestCookieManager to ensure this doesn't happen again. >+ >+ * TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp: >+ (testCookieManagerPersistentStorage): >+ (beforeAll): >+ > 2019-02-04 Ms2ger <Ms2ger@igalia.com> > > [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI >diff --git a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp >index 9e48d2e7c8441180cdbd0236aec764bb6b6c11cb..5d63d482707d70517a50ef401e594a9299d2e051 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp >@@ -56,9 +56,9 @@ public: > > CookieManagerTest() > : WebViewTest() >- , m_cookieManager(webkit_web_context_get_cookie_manager(webkit_web_view_get_context(m_webView))) >+ , m_cookieManager(webkit_web_context_get_cookie_manager(m_webContext.get())) > { >- g_assert_true(webkit_website_data_manager_get_cookie_manager(webkit_web_context_get_website_data_manager(webkit_web_view_get_context(m_webView))) == m_cookieManager); >+ g_assert_true(webkit_website_data_manager_get_cookie_manager(webkit_web_context_get_website_data_manager(m_webContext.get())) == m_cookieManager); > g_signal_connect(m_cookieManager, "changed", G_CALLBACK(cookiesChangedCallback), this); > } > >@@ -535,23 +535,44 @@ static void testCookieManagerCookiesChanged(CookieManagerTest* test, gconstpoint > g_assert_true(test->m_cookiesChanged); > } > >-static void testCookieManagerPersistentStorage(CookieManagerTest* test, gconstpointer) >+class CookiePersistentStorageTest: public CookieManagerTest { >+public: >+ MAKE_GLIB_TEST_FIXTURE_WITH_SETUP_TEARDOWN(CookiePersistentStorageTest, setup, teardown); >+ >+ static void setup() >+ { >+ WebViewTest::shouldInitializeWebViewInConstructor = false; >+ } >+ >+ static void teardown() >+ { >+ WebViewTest::shouldInitializeWebViewInConstructor = true; >+ } >+}; >+ >+static void testCookieManagerPersistentStorage(CookiePersistentStorageTest* test, gconstpointer) > { > test->setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS); > >+ g_unlink(test->m_cookiesTextFile.get()); >+ g_unlink(test->m_cookiesSQLiteFile.get()); >+ > // Text storage using a new file. > test->setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT); > char** domains = test->getDomains(); > g_assert_nonnull(domains); > g_assert_cmpint(g_strv_length(domains), ==, 0); > >+ // Initialization of web view is deferred to ensure it's not required for >+ // setting persistent storage to work. >+ test->initializeWebView(); > test->loadURI(kServer->getURIForPath("/index.html").data()); > test->waitUntilLoadFinished(); > g_assert_true(test->m_cookiesChanged); > domains = test->getDomains(); > g_assert_nonnull(domains); > g_assert_cmpint(g_strv_length(domains), ==, 2); >- >+ g_assert_true(g_file_test(test->m_cookiesTextFile.get(), G_FILE_TEST_EXISTS)); > > // SQLite storage using a new file. > test->setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE); >@@ -565,6 +586,7 @@ static void testCookieManagerPersistentStorage(CookieManagerTest* test, gconstpo > domains = test->getDomains(); > g_assert_nonnull(domains); > g_assert_cmpint(g_strv_length(domains), ==, 2); >+ g_assert_true(g_file_test(test->m_cookiesSQLiteFile.get(), G_FILE_TEST_EXISTS)); > > // Text storage using an existing file. > test->setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT); >@@ -698,7 +720,7 @@ void beforeAll() > CookieManagerTest::add("WebKitCookieManager", "delete-cookie", testCookieManagerDeleteCookie); > CookieManagerTest::add("WebKitCookieManager", "delete-cookies", testCookieManagerDeleteCookies); > CookieManagerTest::add("WebKitCookieManager", "cookies-changed", testCookieManagerCookiesChanged); >- CookieManagerTest::add("WebKitCookieManager", "persistent-storage", testCookieManagerPersistentStorage); >+ CookiePersistentStorageTest::add("WebKitCookieManager", "persistent-storage", testCookieManagerPersistentStorage); > CookieManagerTest::add("WebKitCookieManager", "persistent-storage-delete-all", testCookieManagerPersistentStorageDeleteAll); > CookieManagerTest::add("WebKitCookieManager", "ephemeral", testCookieManagerEphemeral); > }
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194209
: 361207