Bug 235674 - Symbols not always properly hidden when using WebKitAdditions to introduce new API
Summary: Symbols not always properly hidden when using WebKitAdditions to introduce ne...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-26 14:29 PST by Chris Dumez
Modified: 2022-01-28 10:34 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.90 KB, patch)
2022-01-26 14:32 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Follow-up to address ap's comments. (2.62 KB, patch)
2022-01-28 09:46 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-01-26 14:29:21 PST
Symbols not always properly hidden when using WebKitAdditions to introduce new API.
Comment 1 Chris Dumez 2022-01-26 14:29:33 PST
<rdar://87999257>
Comment 2 Chris Dumez 2022-01-26 14:32:36 PST
Created attachment 450070 [details]
Patch
Comment 3 Wenson Hsieh 2022-01-26 16:26:42 PST
Comment on attachment 450070 [details]
Patch

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

> Source/WebKit/mac/replace-webkit-additions-includes.py:93
> +    additions_import_pattern = re.compile(r"\#if ENABLE\(API_WEBKIT_ADDITIONS\)\n#import <WebKitAdditions/(.*)>\n#endif")

(Not necessarily in this patch, but) I wonder if it's even worth throwing a

#if ENABLE(API_WEBKIT_ADDITIONS)
#error "…"
#endif

…somewhere. Not exactly sure where, though.
Comment 4 EWS 2022-01-26 17:06:10 PST
Committed r288658 (246466@main): <https://commits.webkit.org/246466@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 450070 [details].
Comment 5 Alexey Proskuryakov 2022-01-28 09:27:33 PST
Comment on attachment 450070 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h:74
> +#if ENABLE(API_WEBKIT_ADDITIONS)

Given that this foes not behave like an ENABLE macro, why make it look like one? Something like this seems like it would convey the purpose better:

#if 0 // API_WEBKIT_ADDITIONS_REPLACEMENT
Comment 6 Chris Dumez 2022-01-28 09:36:46 PST
(In reply to Alexey Proskuryakov from comment #5)
> Comment on attachment 450070 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=450070&action=review
> 
> > Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h:74
> > +#if ENABLE(API_WEBKIT_ADDITIONS)
> 
> Given that this foes not behave like an ENABLE macro, why make it look like
> one? Something like this seems like it would convey the purpose better:
> 
> #if 0 // API_WEBKIT_ADDITIONS_REPLACEMENT

Sure, this seems reasonable. I'll discuss this with Wenson & Tim and follow-up.
Comment 7 Chris Dumez 2022-01-28 09:46:38 PST
Reopening to attach new patch.
Comment 8 Chris Dumez 2022-01-28 09:46:40 PST
Created attachment 450244 [details]
Follow-up to address ap's comments.
Comment 9 Chris Dumez 2022-01-28 09:51:04 PST
(In reply to Chris Dumez from comment #6)
> (In reply to Alexey Proskuryakov from comment #5)
> > Comment on attachment 450070 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=450070&action=review
> > 
> > > Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h:74
> > > +#if ENABLE(API_WEBKIT_ADDITIONS)
> > 
> > Given that this foes not behave like an ENABLE macro, why make it look like
> > one? Something like this seems like it would convey the purpose better:
> > 
> > #if 0 // API_WEBKIT_ADDITIONS_REPLACEMENT
> 
> Sure, this seems reasonable. I'll discuss this with Wenson & Tim and
> follow-up.

Thanks for the improvement suggestion :)
Comment 10 EWS 2022-01-28 10:34:38 PST
Committed r288747 (246540@main): <https://commits.webkit.org/246540@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 450244 [details].