Bug 213534 - [WinCairo] Cannot build without resource load statistics
Summary: [WinCairo] Cannot build without resource load statistics
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Stephan Szabo
Keywords: InRadar
Depends on:
Reported: 2020-06-23 14:39 PDT by Stephan Szabo
Modified: 2020-06-26 10:17 PDT (History)
6 users (show)

See Also:

Patch (2.69 KB, patch)
2020-06-23 14:47 PDT, Stephan Szabo
achristensen: review-
Details | Formatted Diff | Diff
Patch (2.85 KB, patch)
2020-06-25 10:14 PDT, Stephan Szabo
no flags Details | Formatted Diff | Diff

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

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]

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

> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:75

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

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]

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
Comment 6 Radar WebKit Bug Importer 2020-06-26 10:17:15 PDT