Title: [202834] trunk/Source/WebKit2
- Revision
- 202834
- Author
- [email protected]
- Date
- 2016-07-05 15:21:54 -0700 (Tue, 05 Jul 2016)
Log Message
Actually persist changes to cookie accept policy.
https://bugs.webkit.org/show_bug.cgi?id=159377
<rdar://problem/22774152>
Patch by Alex Christensen <[email protected]> on 2016-07-05
Reviewed by Alexey Proskuryakov.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):
Added logging.
* UIProcess/mac/WebCookieManagerProxyMac.mm:
(WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
When we persist the cookie accept policy, we want to call _saveCookies to actually write the
change to disk so that when we create a new process which reads from disk to determine its
cookie accept policy, it will read the new cookie accept policy. Before this patch it was
reading the old one in some cases where the changes had not yet been persisted to disk.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (202833 => 202834)
--- trunk/Source/WebKit2/ChangeLog 2016-07-05 21:34:33 UTC (rev 202833)
+++ trunk/Source/WebKit2/ChangeLog 2016-07-05 22:21:54 UTC (rev 202834)
@@ -1,3 +1,21 @@
+2016-07-05 Alex Christensen <[email protected]>
+
+ Actually persist changes to cookie accept policy.
+ https://bugs.webkit.org/show_bug.cgi?id=159377
+ <rdar://problem/22774152>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSession::NetworkSession):
+ Added logging.
+ * UIProcess/mac/WebCookieManagerProxyMac.mm:
+ (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
+ When we persist the cookie accept policy, we want to call _saveCookies to actually write the
+ change to disk so that when we create a new process which reads from disk to determine its
+ cookie accept policy, it will read the new cookie accept policy. Before this patch it was
+ reading the old one in some cases where the changes had not yet been persisted to disk.
+
2016-07-04 Carlos Garcia Campos <[email protected]>
[Coordinated Graphics] Modernize and cleanup CompositingCoordinator
Modified: trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm (202833 => 202834)
--- trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2016-07-05 21:34:33 UTC (rev 202833)
+++ trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2016-07-05 22:21:54 UTC (rev 202834)
@@ -393,6 +393,7 @@
configuration.URLCredentialStorage = nil;
m_sessionWithoutCredentialStorageDelegate = adoptNS([[WKNetworkSessionDelegate alloc] initWithNetworkSession:*this withCredentials:false]);
m_sessionWithoutCredentialStorage = [NSURLSession sessionWithConfiguration:configuration delegate:static_cast<id>(m_sessionWithoutCredentialStorageDelegate.get()) delegateQueue:[NSOperationQueue mainQueue]];
+ LOG(NetworkSession, "Created NetworkSession with cookieAcceptPolicy %lu", configuration.HTTPCookieStorage.cookieAcceptPolicy);
}
NetworkSession::~NetworkSession()
Modified: trunk/Source/WebKit2/UIProcess/mac/WebCookieManagerProxyMac.mm (202833 => 202834)
--- trunk/Source/WebKit2/UIProcess/mac/WebCookieManagerProxyMac.mm 2016-07-05 21:34:33 UTC (rev 202833)
+++ trunk/Source/WebKit2/UIProcess/mac/WebCookieManagerProxyMac.mm 2016-07-05 22:21:54 UTC (rev 202834)
@@ -26,6 +26,8 @@
#import "config.h"
#import "WebCookieManagerProxy.h"
+#import <WebCore/CFNetworkSPI.h>
+
namespace WebKit {
void WebCookieManagerProxy::persistHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy)
@@ -34,6 +36,7 @@
// policy in the UI Process as well as in the Web Process (to make sure it gets set on any
// Private Browsing Cookie Storage).
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:static_cast<NSHTTPCookieAcceptPolicy>(policy)];
+ [[NSHTTPCookieStorage sharedHTTPCookieStorage] _saveCookies];
}
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes