Bug 213534

Summary: [WinCairo] Cannot build without resource load statistics
Product: WebKit Reporter: Stephan Szabo <stephan.szabo>
Component: WebKit Misc.Assignee: Stephan Szabo <stephan.szabo>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aperez, clopez, don.olmstead, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
achristensen: review-
Patch none

Description Stephan Szabo 2020-06-23 14:39:42 PDT
Seemingly after https://bugs.webkit.org/show_bug.cgi?id=213291 builds without ENABLE(RESOURCE_LOAD_STATISTICS) started to fail on wincairo with errors about uses of things behind the enable from outside.

Initial errors were:

D:\github\webkit\Source\WebKit\UIProcess/WebsiteData/WebsiteDataStore.cpp(1013): error C2039: 'resourceLoadStatisticsRegistrableDomains': is not a member of 'WebKit::WebsiteDataRecord'
D:\github\webkit\Source\WebKit\UIProcess\WebsiteData\WebsiteDataStore.h(86): note: see declaration of 'WebKit::WebsiteDataRecord'
D:\github\webkit\Source\WebKit\UIProcess/WebsiteData/WebsiteDataStore.cpp(1013): error C2530: 'registrableDomain': references must be initialized
D:\github\webkit\Source\WebKit\UIProcess/WebsiteData/WebsiteDataStore.cpp(1013): error C3531: 'registrableDomain': a symbol whose type contains 'auto' must have an initializer
D:\github\webkit\Source\WebKit\UIProcess/WebsiteData/WebsiteDataStore.cpp(1013): error C2143: syntax error: missing ';' before ':'
D:\github\webkit\Source\WebKit\UIProcess/WebsiteData/WebsiteDataStore.cpp(1013): error C2143: syntax error: missing ';' before ')'
Comment 1 Stephan Szabo 2020-06-23 14:47:27 PDT
Created attachment 402594 [details]
Patch

I'm not sure if just using the old code in the not resource load statistics enabled case is the best option but it gets past the compile-time errors.
Comment 2 Alex Christensen 2020-06-24 11:21:03 PDT
Comment on attachment 402594 [details]
Patch

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

> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:75
> +#if ENABLE(RESOURCE_LOAD_STATISTICS)

WKWebsiteDataStoreRemoveITPDataForDomain should probably just do nothing or immediately call the callback if RESOURCE_LOAD_STATISTICS is not enabled, because there's nothing to do.

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:1013
> +#if ENABLE(RESOURCE_LOAD_STATISTICS)

Ditto.  I think it's ok to just do nothing here if RESOURCE_LOAD_STATISTICS is not enabled.
Comment 3 Stephan Szabo 2020-06-25 10:14:58 PDT
Created attachment 402743 [details]
Patch

Updated to call the callback immediately in the API case and to do nothing in the other when the flag isn't set.
Comment 4 EWS 2020-06-26 10:16:29 PDT
Committed r263568: <https://trac.webkit.org/changeset/263568>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402743 [details].
Comment 5 Radar WebKit Bug Importer 2020-06-26 10:17:14 PDT
<rdar://problem/64811452>
Comment 6 Radar WebKit Bug Importer 2020-06-26 10:17:15 PDT
<rdar://problem/64811453>