Bug 180788 - Make WebsitePolicies a proper class with getters and setters
Summary: Make WebsitePolicies a proper class with getters and setters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-13 17:57 PST by Alex Christensen
Modified: 2017-12-14 14:08 PST (History)
2 users (show)

See Also:


Attachments
Patch (22.15 KB, patch)
2017-12-13 18:00 PST, Alex Christensen
aestes: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2017-12-13 17:57:14 PST
Make WebsitePolicies a proper class with getters and setters
Comment 1 Alex Christensen 2017-12-13 18:00:05 PST
Created attachment 329301 [details]
Patch
Comment 2 Andy Estes 2017-12-14 13:10:31 PST
Comment on attachment 329301 [details]
Patch

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

> Source/WebKit/Shared/WebsitePolicies.h:71
> +    const Vector<WebCore::HTTPHeaderField>& customHeaderFields() { return m_customHeaderFields; }

Should be const-qualified.

> Source/WebKit/UIProcess/API/APIWebsitePolicies.h:50
> +    const Vector<WebCore::HTTPHeaderField> customHeaderFields() { return m_websitePolicies.customHeaderFields(); }

Should be const-qualified.

It's also weird to return a const value.
Comment 3 Alex Christensen 2017-12-14 14:07:58 PST
http://trac.webkit.org/r225925
Comment 4 Radar WebKit Bug Importer 2017-12-14 14:08:21 PST
<rdar://problem/36057847>