Bug 167990 - Remove most cases of #if ENABLE(CACHE_PARTITIONING)
Summary: Remove most cases of #if ENABLE(CACHE_PARTITIONING)
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2017-02-08 08:14 PST by Antti Koivisto
Modified: 2017-02-09 03:11 PST (History)
1 user (show)

See Also:

patch (60.59 KB, patch)
2017-02-08 08:26 PST, Antti Koivisto
sam: review+
Details | Formatted Diff | Diff
patch (58.46 KB, patch)
2017-02-09 01:21 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (57.38 KB, patch)
2017-02-09 02:25 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2017-02-08 08:14:47 PST
This is ifdef is all over the place.
Comment 1 Antti Koivisto 2017-02-08 08:26:17 PST
Created attachment 300901 [details]
Comment 2 Sam Weinig 2017-02-08 09:00:35 PST
Comment on attachment 300901 [details]

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

I love this!  rs=me when you get it compiling.

> Source/WebCore/loader/FrameLoader.cpp:1204
>          request.setDomainForCachePartition(m_frame.tree().top().document()->securityOrigin().domainForCachePartition());

Should this be using topOrigin?

> Source/WebCore/loader/cache/MemoryCache.cpp:562
>      static NeverDestroyed<String> httpString("http");

This can't really be necessary now that we have ASCIILiteral, right?

> Source/WebCore/platform/network/ResourceRequestBase.cpp:665
> +#else
> +    return domain;
> +#endif

Is this the right decision? Maybe we should we just return emptyString() if there is no PUBLIC_SUFFIX_LIST support? Or maybe we should #error if you enable ENABLE(CACHE_PARTITIONING) without ENABLE(PUBLIC_SUFFIX_LIST)?

> Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:97
> +    
>      revalidationRequest.makeUnconditional();

No need for this extra newline.
Comment 3 Antti Koivisto 2017-02-09 01:21:28 PST
Created attachment 301023 [details]
Comment 4 Antti Koivisto 2017-02-09 02:25:23 PST
Created attachment 301026 [details]
Comment 5 Antti Koivisto 2017-02-09 03:11:22 PST