RESOLVED FIXED 144820
[Mac] Share cookie storage between UI process and secondary processes
https://bugs.webkit.org/show_bug.cgi?id=144820
Summary [Mac] Share cookie storage between UI process and secondary processes
Alexey Proskuryakov
Reported 2015-05-08 17:06:37 PDT
When UI process uses a custom cookie storage location, WebProcess and NetworkProcess don't pick it up. rdar://problem/20734401
Attachments
proposed patch (20.37 KB, patch)
2015-05-11 16:10 PDT, Alexey Proskuryakov
no flags
proposed patch (21.37 KB, patch)
2015-05-11 16:27 PDT, Alexey Proskuryakov
no flags
more iOS build fix (21.53 KB, patch)
2015-05-12 10:27 PDT, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2015-05-11 16:10:31 PDT
Created attachment 252904 [details] proposed patch
WebKit Commit Bot
Comment 2 2015-05-11 16:12:59 PDT
Attachment 252904 [details] did not pass style-queue: ERROR: Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp:114: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/Shared/WebProcessCreationParameters.cpp:191: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/platform/network/mac/CookieJarMac.mm:29: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexey Proskuryakov
Comment 3 2015-05-11 16:27:11 PDT
Created attachment 252905 [details] proposed patch With iOS build fix.
WebKit Commit Bot
Comment 4 2015-05-11 16:29:35 PDT
Attachment 252905 [details] did not pass style-queue: ERROR: Source/WebCore/platform/network/mac/CookieJarMac.mm:29: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexey Proskuryakov
Comment 5 2015-05-12 10:27:05 PDT
Created attachment 252971 [details] more iOS build fix
WebKit Commit Bot
Comment 6 2015-05-12 10:28:53 PDT
Attachment 252971 [details] did not pass style-queue: ERROR: Source/WebCore/platform/network/mac/CookieJarMac.mm:29: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 7 2015-05-12 10:31:14 PDT
Comment on attachment 252971 [details] more iOS build fix View in context: https://bugs.webkit.org/attachment.cgi?id=252971&action=review > Source/WebKit2/Shared/WebProcessCreationParameters.cpp:186 > + if (!decoder.decode(result.cookieStorageDirectory)) This says "result" but should say "parameters". > Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:158 > +#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 > + if ([NSHTTPCookieStorage respondsToSelector:@selector(_setSharedHTTPCookieStorage:)]) { > + RetainPtr<CFDataRef> cookieStorageData = adoptCF(CFDataCreate(kCFAllocatorDefault, parameters.uiProcessCookieStorageIdentifier.data(), parameters.uiProcessCookieStorageIdentifier.size())); > + RetainPtr<CFHTTPCookieStorageRef> uiProcessCookieStorage = adoptCF(CFHTTPCookieStorageCreateFromIdentifyingData(kCFAllocatorDefault, cookieStorageData.get())); > + [NSHTTPCookieStorage _setSharedHTTPCookieStorage:adoptNS([[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:uiProcessCookieStorage.get()]).get()]; > + } > +#endif Can we avoid having two copies of this code?
Alexey Proskuryakov
Comment 8 2015-05-12 12:39:34 PDT
Committed with the proposed changes in <http://trac.webkit.org/r184211> (and then I noticed that iOS EWS is still red!)
Alexey Proskuryakov
Comment 9 2015-05-12 12:43:47 PDT
iOS build fix in r184212.
Note You need to log in before you can comment on or make changes to this bug.