RESOLVED FIXED 174580
WKHTTPCookieStore observing only works on the default cookie store
https://bugs.webkit.org/show_bug.cgi?id=174580
Summary WKHTTPCookieStore observing only works on the default cookie store
Brady Eidson
Reported 2017-07-17 06:19:30 PDT
WKHTTPCookieStore observing only works on the default cookie store Whoops. <rdar://problem/33330724>
Attachments
Patch (25.53 KB, patch)
2017-07-17 06:25 PDT, Brady Eidson
no flags
Archive of layout-test-results from ews112 for mac-elcapitan (1.82 MB, application/zip)
2017-07-17 07:47 PDT, Build Bot
no flags
Patch (25.47 KB, patch)
2017-07-17 11:27 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2017-07-17 06:25:51 PDT
Build Bot
Comment 2 2017-07-17 07:47:41 PDT
Comment on attachment 315660 [details] Patch Attachment 315660 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4135622 New failing tests: security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html
Build Bot
Comment 3 2017-07-17 07:47:42 PDT
Created attachment 315663 [details] Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Brady Eidson
Comment 4 2017-07-17 09:15:17 PDT
(In reply to Build Bot from comment #3) > Created attachment 315663 [details] > Archive of layout-test-results from ews112 for mac-elcapitan > > The attached test failures were seen while running run-webkit-tests on the > mac-debug-ews. > Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6 Not caused by this patch.
Sam Weinig
Comment 5 2017-07-17 11:06:29 PDT
Comment on attachment 315660 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315660&action=review r=me but please consider the changes proposed. > Source/WebCore/platform/network/NetworkStorageSession.h:153 > + > +#if PLATFORM(COCOA) > +public: > + CookieStorageObserver& cookieStorageObserver() const; > + > +private: > + mutable RefPtr<CookieStorageObserver> m_cookieStorageObserver; > +#endif It makes me sad how this ostensibly cross-platform file, NetworkStorageSession, has so much that is platform dependent. Something like CookieStorageObserver seems like it could be a cross-platform abstraction that everyone would want (see cookiesDidChange in the SOUP section above). Can we make it that way, and just stub things out for SOUP for now? > Source/WebCore/platform/network/cocoa/CookieStorageObserver.h:25 > + */ > +#pragma once Missing newline above pragma. > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:203 > + NSURL *cookieStorageFile = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/CookieStorage/Cookie.File" stringByExpandingTildeInPath] isDirectory:NO]; > + NSURL *idbPath = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/IndexedDB/" stringByExpandingTildeInPath] isDirectory:YES]; Do we really need to use ~/Library/ for this stuff? Can we make it point to something in the temp directory (_CS_DARWIN_USER_TEMP_DIR and all that jazz)?
Brady Eidson
Comment 6 2017-07-17 11:23:14 PDT
(In reply to Sam Weinig from comment #5) > Comment on attachment 315660 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=315660&action=review > > r=me but please consider the changes proposed. > > > Source/WebCore/platform/network/NetworkStorageSession.h:153 > > + > > +#if PLATFORM(COCOA) > > +public: > > + CookieStorageObserver& cookieStorageObserver() const; > > + > > +private: > > + mutable RefPtr<CookieStorageObserver> m_cookieStorageObserver; > > +#endif > > It makes me sad how this ostensibly cross-platform file, > NetworkStorageSession, has so much that is platform dependent. Something > like CookieStorageObserver seems like it could be a cross-platform > abstraction that everyone would want (see cookiesDidChange in the SOUP > section above). Can we make it that way, and just stub things out for SOUP > for now? I agree this class could be cross platform, but I'm not sure the value of splitting it up now with no commitment to adopt from another port. > > Source/WebCore/platform/network/cocoa/CookieStorageObserver.h:25 > > + */ > > +#pragma once > > Missing newline above pragma. Whoops! > > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:203 > > + NSURL *cookieStorageFile = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/CookieStorage/Cookie.File" stringByExpandingTildeInPath] isDirectory:NO]; > > + NSURL *idbPath = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/IndexedDB/" stringByExpandingTildeInPath] isDirectory:YES]; > > Do we really need to use ~/Library/ for this stuff? Can we make it point to > something in the temp directory (_CS_DARWIN_USER_TEMP_DIR and all that jazz)? The default paths for the default WebsiteDataStore are already in ~/Library/WebKit/TestWebKitAPI
Brady Eidson
Comment 7 2017-07-17 11:27:54 PDT
WebKit Commit Bot
Comment 8 2017-07-17 12:10:09 PDT
Comment on attachment 315683 [details] Patch Clearing flags on attachment: 315683 Committed r219567: <http://trac.webkit.org/changeset/219567>
WebKit Commit Bot
Comment 9 2017-07-17 12:10:11 PDT
All reviewed patches have been landed. Closing bug.
Sam Weinig
Comment 10 2017-07-17 12:12:23 PDT
(In reply to Brady Eidson from comment #6) > (In reply to Sam Weinig from comment #5) > > Comment on attachment 315660 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=315660&action=review > > > > r=me but please consider the changes proposed. > > > > > Source/WebCore/platform/network/NetworkStorageSession.h:153 > > > + > > > +#if PLATFORM(COCOA) > > > +public: > > > + CookieStorageObserver& cookieStorageObserver() const; > > > + > > > +private: > > > + mutable RefPtr<CookieStorageObserver> m_cookieStorageObserver; > > > +#endif > > > > It makes me sad how this ostensibly cross-platform file, > > NetworkStorageSession, has so much that is platform dependent. Something > > like CookieStorageObserver seems like it could be a cross-platform > > abstraction that everyone would want (see cookiesDidChange in the SOUP > > section above). Can we make it that way, and just stub things out for SOUP > > for now? > > I agree this class could be cross platform, but I'm not sure the value of > splitting it up now with no commitment to adopt from another port. There is inherent value in providing proper abstractions. Our model has historically been to build the abstraction, add stubs, and others tend to follow.
Note You need to log in before you can comment on or make changes to this bug.