Title: [191943] trunk/Source/WebKit2
- Revision
- 191943
- Author
- commit-qu...@webkit.org
- Date
- 2015-11-03 01:28:15 -0800 (Tue, 03 Nov 2015)
Log Message
Use the same cookie storage as WebCore when using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=150833
Patch by Alex Christensen <achristen...@webkit.org> on 2015-11-03
Reviewed by Antti Koivisto.
This fixes 12 tests when using NETWORK_SESSION.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (191942 => 191943)
--- trunk/Source/WebKit2/ChangeLog 2015-11-03 09:16:53 UTC (rev 191942)
+++ trunk/Source/WebKit2/ChangeLog 2015-11-03 09:28:15 UTC (rev 191943)
@@ -1,5 +1,17 @@
2015-11-03 Alex Christensen <achristen...@webkit.org>
+ Use the same cookie storage as WebCore when using NETWORK_SESSION
+ https://bugs.webkit.org/show_bug.cgi?id=150833
+
+ Reviewed by Antti Koivisto.
+
+ This fixes 12 tests when using NETWORK_SESSION.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSession::NetworkSession):
+
+2015-11-03 Alex Christensen <achristen...@webkit.org>
+
Clean up NETWORK_SESSION code after r191848
https://bugs.webkit.org/show_bug.cgi?id=150829
Modified: trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm (191942 => 191943)
--- trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2015-11-03 09:16:53 UTC (rev 191942)
+++ trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2015-11-03 09:28:15 UTC (rev 191943)
@@ -28,9 +28,10 @@
#if USE(NETWORK_SESSION)
+#import "SessionTracker.h"
#import <Foundation/NSURLSession.h>
-
#import <WebCore/AuthenticationChallenge.h>
+#import <WebCore/CFNetworkSPI.h>
#import <WebCore/Credential.h>
#import <WebCore/ResourceError.h>
#import <WebCore/ResourceRequest.h>
@@ -183,6 +184,11 @@
m_sessionDelegate = adoptNS([[NetworkSessionDelegate alloc] initWithNetworkSession:*this]);
NSURLSessionConfiguration *configuration = configurationForType(type);
+ // FIXME: Use SessionTracker to make sure the correct cookie storage is used once there is more than one NetworkSession.
+ if (auto* session = SessionTracker::session(WebCore::SessionID::defaultSessionID())) {
+ if (CFHTTPCookieStorageRef storage = session->cookieStorage().get())
+ configuration.HTTPCookieStorage = [[[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:storage] autorelease];
+ }
m_session = [NSURLSession sessionWithConfiguration:configuration delegate:static_cast<id>(m_sessionDelegate.get()) delegateQueue:[NSOperationQueue mainQueue]];
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes