[webkit-reviews] review denied: [Bug 177394] Figure out how to disable all cookies in the stateless network storage session : [Attachment 331436] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 16 16:19:29 PST 2018


Alex Christensen <achristensen at apple.com> has denied John Wilander
<wilander at apple.com>'s request for review:
Bug 177394: Figure out how to disable all cookies in the stateless network
storage session
https://bugs.webkit.org/show_bug.cgi?id=177394

Attachment 331436: Patch

https://bugs.webkit.org/attachment.cgi?id=331436&action=review




--- Comment #14 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 331436
  --> https://bugs.webkit.org/attachment.cgi?id=331436
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=331436&action=review

> Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h:182
> +- (id) _initWithIdentifier:(NSString*) identifier private:(bool) isPrivate;

No space before identifier.
Space after NSString

> Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h:188
> +- (void) _setExplicitCookieStorage:(CFHTTPCookieStorageRef) storage;

I think this doesn't need to be here because we only call the SPI with
performSelector.

> Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h:83
> +    NSHTTPCookieStorage* emptyDenyAllCookieStorage();

This should be static because it uses no member variables.
static NSHTTPCookieStorage *statelessCookieStorage()

> Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:107
> +    static NSHTTPCookieStorage* emptyCookieStorage;

static NeverDestroyed<RetainPtr<NSHTTPCookieStorage>>

Then we can adopt the alloc'd object and pretend we manage it.

> Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:308
> +	       [m_task.get()
performSelector:NSSelectorFromString(@"_setExplicitCookieStorage:")
withObject:(NSObject*)m_session->networkStorageSession().nsCookieStorage()._coo
kieStorage];
> +	       m_hasBeenSetToUseEmptyDenyAllCookieStorage = false;

I'd make a private member function:
setCookiesBlocked(bool)


More information about the webkit-reviews mailing list