Bug 211246 - [GTK] Add additional exports to support hidden visibility
Summary: [GTK] Add additional exports to support hidden visibility
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-30 12:09 PDT by Don Olmstead
Modified: 2020-05-01 12:51 PDT (History)
22 users (show)

See Also:


Attachments
WIP Patch (18.08 KB, patch)
2020-04-30 13:55 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Enable export macros everywhere (6.21 KB, patch)
2020-04-30 14:51 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (3.81 KB, patch)
2020-05-01 10:20 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (21.05 KB, patch)
2020-05-01 10:21 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff

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