Bug 139350 - Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
Summary: Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePol...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 139263
  Show dependency treegraph
 
Reported: 2014-12-06 20:50 PST by Chris Dumez
Modified: 2014-12-08 11:32 PST (History)
6 users (show)

See Also:


Attachments
Patch (1.93 KB, patch)
2014-12-06 20:53 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.22 KB, patch)
2014-12-08 10:01 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2014-12-06 20:50:34 PST
Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy() and use m_loadType instead. ResourceRequest::cachePolicy() is meant to be passed to the network stack, and isn't supposed to be used as input inside WebCore [1].

[1] https://bugs.webkit.org/show_bug.cgi?id=139263#c2
Comment 1 Chris Dumez 2014-12-06 20:53:07 PST
Created attachment 242732 [details]
Patch
Comment 2 Antti Koivisto 2014-12-08 06:08:09 PST
Comment on attachment 242732 [details]
Patch

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

> Source/WebCore/loader/FrameLoader.cpp:2160
> +    default:
> +        return CachePolicyVerify;
> +    }

It would be better to list all cases rather than use default.
Comment 3 Chris Dumez 2014-12-08 10:01:00 PST
Created attachment 242823 [details]
Patch
Comment 4 WebKit Commit Bot 2014-12-08 10:41:39 PST
Comment on attachment 242823 [details]
Patch

Clearing flags on attachment: 242823

Committed r176953: <http://trac.webkit.org/changeset/176953>
Comment 5 WebKit Commit Bot 2014-12-08 10:41:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Csaba Osztrogonác 2014-12-08 11:22:23 PST
(In reply to comment #4)
> Comment on attachment 242823 [details]
> Patch
> 
> Clearing flags on attachment: 242823
> 
> Committed r176953: <http://trac.webkit.org/changeset/176953>

It broke the EFL build, because gcc need some love - an unreachable return.
I'm wondering why EFL EWS didn't notice this warning ...

../../Source/WebCore/loader/FrameLoader.cpp: In member function ‘WebCore::CachePolicy WebCore::FrameLoader::subresourceCachePolicy() const’:
../../Source/WebCore/loader/FrameLoader.cpp:2167:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^

Fix is coming.
Comment 7 Csaba Osztrogonác 2014-12-08 11:32:24 PST
Fix landed in https://trac.webkit.org/changeset/176958