Bug 141994 - Fix build break on EFL and GTK port since r180585.
Summary: Fix build break on EFL and GTK port since r180585.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on: 141984
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-24 17:42 PST by Gyuyoung Kim
Modified: 2015-02-24 18:31 PST (History)
0 users

See Also:


Attachments
Patch (2.28 KB, patch)
2015-02-24 17:43 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (2.07 KB, patch)
2015-02-24 18:02 PST, Gyuyoung Kim
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>