Bug 141994

Summary: Fix build break on EFL and GTK port since r180585.
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit2Assignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 141984    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch joepeck: review+

Description Gyuyoung Kim 2015-02-24 17:42:03 PST
There are two kind of build error on EFL and GTK ports since  r180585.
                          ^
../../Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp: In member function ‘void WebKit::WebsiteDataStore::fetchData(WebKit::WebsiteDataTypes, std::function<void(WTF::Vector<WebKit::WebsiteDataRecord>)>)::CallbackAggregator::removePendingCallback(WebKit::WebsiteData)’:
../../Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:141:90: error: missing initializer for member ‘WebKit::WebsiteDataRecord::displayName’ [-Werror=missing-field-initializers]
                 auto& record = m_websiteDataRecords.add(displayName, WebsiteDataRecord { }).iterator->value;
                                                                                          ^
../../Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:141:90: error: missing initializer for member ‘WebKit::WebsiteDataRecord::types’ [-Werror=missing-field-initializers]
../../Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:141:90: error: missing initializer for member ‘WebKit::WebsiteDataRecord::origins’ [-Werror=missing-field-initializers]
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.


../../Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.cpp: In static member function ‘static WTF::String WebKit::WebsiteDataRecord::displayNameForOrigin(const WebCore::SecurityOrigin&)’:
../../Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.cpp:44:16: error: ‘topPrivatelyControlledDomain’ is not a member of ‘WebCore’
         return WebCore::topPrivatelyControlledDomain(securityOrigin.host());
                ^
Comment 1 Gyuyoung Kim 2015-02-24 17:43:41 PST
Created attachment 247285 [details]
Patch
Comment 2 Simon Fraser (smfr) 2015-02-24 17:52:11 PST
Comment on attachment 247285 [details]
Patch

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

> Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.cpp:45
> +#if PLATFORM(MAC)

Should probably be PLATFORM(COCOA)
Comment 3 Joseph Pecoraro 2015-02-24 17:53:13 PST
Comment on attachment 247285 [details]
Patch

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

> Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.cpp:50
>      if (protocol == "http" || protocol == "https")
> +#if PLATFORM(MAC)
>          return WebCore::topPrivatelyControlledDomain(securityOrigin.host());
> +#else
> +        notImplemented();
> +        return String();
> +#endif

It looks like you mean this return to be inside the if block, but because the if does not have braces that wouldn't be the case. It still results in identical behavior but in a very misleading way.

How about just guarding the entire if block?

    #if ENABLE(PUBLIC_SUFFIX_LIST)
    if (protocol == "http" || protocol == "https")
        return WebCore::topPrivatelyControlledDomain(securityOrigin.host());
    #endif

Using the same enable guard that wraps topPrivatelyControlledDomain.
Comment 4 Gyuyoung Kim 2015-02-24 18:02:25 PST
Created attachment 247289 [details]
Patch
Comment 5 Joseph Pecoraro 2015-02-24 18:03:08 PST
Comment on attachment 247289 [details]
Patch

r=me
Comment 6 Gyuyoung Kim 2015-02-24 18:31:45 PST
Committed r180603: <http://trac.webkit.org/changeset/180603>