Bug 211246

Summary: [GTK] Add additional exports to support hidden visibility
Product: WebKit Reporter: Don Olmstead <don.olmstead>
Component: PlatformAssignee: Don Olmstead <don.olmstead>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, aperez, benjamin, berto, cdumez, cgarcia, clopez, cmarcelo, ews-watchlist, gustavo, gyuyoung.kim, hi, joepeck, keith_miller, mark.lam, mcatanzaro, msaboff, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch
none
Enable export macros everywhere
none
Patch
none
Patch none

Description Don Olmstead 2020-04-30 12:09:37 PDT
Ideally GTK should be compiled with USE_EXPORT_MACROS and default to hidden visibility. This patch just adds the relevant exports to get that happening.

This is an offshoot of https://bugs.webkit.org/show_bug.cgi?id=210366 which got GTK compiling with hidden visibility.
Comment 1 Don Olmstead 2020-04-30 13:55:30 PDT Comment hidden (obsolete)
Comment 2 EWS Watchlist 2020-04-30 13:56:10 PDT Comment hidden (obsolete)
Comment 3 Don Olmstead 2020-04-30 14:51:13 PDT Comment hidden (obsolete)
Comment 4 Don Olmstead 2020-05-01 10:20:34 PDT Comment hidden (obsolete)
Comment 5 Don Olmstead 2020-05-01 10:21:43 PDT
Created attachment 398198 [details]
Patch
Comment 6 Michael Catanzaro 2020-05-01 12:00:00 PDT
Comment on attachment 398198 [details]
Patch

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

Wow, that must have been a lot of EWSing. I wonder what this will break....

> Source/WTF/wtf/ASCIICType.cpp:30
> -WTF_EXPORT_PRIVATE const unsigned char asciiCaseFoldTable[256] = {
> +const unsigned char asciiCaseFoldTable[256] = {

Since you're changing this anyway... should use static keyword to restrict it to file scope.

> Tools/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:707
> -extern "C" void webkit_web_extension_initialize_with_user_data(WebKitWebExtension* extension, GVariant* userData)
> +extern "C" WTF_EXPORT_DECLARATION void webkit_web_extension_initialize_with_user_data(WebKitWebExtension* extension, GVariant* userData)

I guess WTF_EXPORT_DECLARATION is probably a suitable macro to choose for these. Not much benefit in creating a new one. OK.
Comment 7 Don Olmstead 2020-05-01 12:27:42 PDT
Comment on attachment 398198 [details]
Patch

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

>> Source/WTF/wtf/ASCIICType.cpp:30
>> +const unsigned char asciiCaseFoldTable[256] = {
> 
> Since you're changing this anyway... should use static keyword to restrict it to file scope.

Its actually defined in the header file. The following appeared in a build log so I just went ahead and fixed it.

../../Source/WTF/wtf/ASCIICType.cpp:30:62: warning: ‘visibility’ attribute ignored [-Wattributes]
 WTF_EXPORT_PRIVATE const unsigned char asciiCaseFoldTable[256] = {
Comment 8 EWS 2020-05-01 12:50:07 PDT
Committed r261014: <https://trac.webkit.org/changeset/261014>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398198 [details].
Comment 9 Radar WebKit Bug Importer 2020-05-01 12:51:16 PDT
<rdar://problem/62743117>