RESOLVED FIXED 141849
Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
https://bugs.webkit.org/show_bug.cgi?id=141849
Summary Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
David Kilzer (:ddkilzer)
Reported 2015-02-20 12:31:14 PST
We should make the namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros. And do a little clean-up at the same time, and some future support for Bug 141816.
Attachments
Patch v1 (for EWS builds) (17.12 KB, patch)
2015-02-20 13:19 PST, David Kilzer (:ddkilzer)
no flags
Patch v2 (for EWS builds) (17.98 KB, patch)
2015-02-20 13:30 PST, David Kilzer (:ddkilzer)
no flags
Patch v3 (for EWS builds) (18.03 KB, patch)
2015-02-20 13:46 PST, David Kilzer (:ddkilzer)
no flags
Patch v4 (for landing; test EWS builds) (20.74 KB, patch)
2015-02-20 19:19 PST, David Kilzer (:ddkilzer)
bfulgham: review+
David Kilzer (:ddkilzer)
Comment 1 2015-02-20 13:19:12 PST
Created attachment 246992 [details] Patch v1 (for EWS builds)
WebKit Commit Bot
Comment 2 2015-02-20 13:20:50 PST
Attachment 246992 [details] did not pass style-queue: ERROR: Source/WebCore/platform/win/SoftLinking.h:206: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:316: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:329: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:334: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
David Kilzer (:ddkilzer)
Comment 3 2015-02-20 13:30:43 PST
Created attachment 246994 [details] Patch v2 (for EWS builds)
WebKit Commit Bot
Comment 4 2015-02-20 13:32:50 PST
Attachment 246994 [details] did not pass style-queue: ERROR: Source/WebCore/platform/win/SoftLinking.h:206: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:316: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:329: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:334: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 5 2015-02-20 13:43:40 PST
Comment on attachment 246994 [details] Patch v2 (for EWS builds) View in context: https://bugs.webkit.org/attachment.cgi?id=246994&action=review This looks good, but I feel like making the SOFT_LINK_NAMESPACE an argument to SOFT_LINK_FRAMEWORK, etc., might be simpler. But it's fine as-is. > Source/WebCore/platform/cf/CoreMediaSoftLink.cpp:36 > +SOFT_LINK_FRAMEWORK_SOURCE(CoreMedia) Why not just make SOFT_LINK_NAMESPACE an argument to SOFT_LINK_FRAMEWORK_{SOURCE, HEADER}?
David Kilzer (:ddkilzer)
Comment 6 2015-02-20 13:46:47 PST
Created attachment 246996 [details] Patch v3 (for EWS builds)
Brent Fulgham
Comment 7 2015-02-20 13:47:39 PST
Comment on attachment 246996 [details] Patch v3 (for EWS builds) Same comments as before. Looks fine!
WebKit Commit Bot
Comment 8 2015-02-20 13:49:14 PST
Attachment 246996 [details] did not pass style-queue: ERROR: Source/WebCore/platform/win/SoftLinking.h:197: SOFT_LINK_NAMESPACE is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/win/SoftLinking.h:207: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:316: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:330: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:335: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 5 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
David Kilzer (:ddkilzer)
Comment 9 2015-02-20 13:54:22 PST
(In reply to comment #5) > Comment on attachment 246994 [details] > Patch v2 (for EWS builds) > > View in context: > https://bugs.webkit.org/attachment.cgi?id=246994&action=review > > This looks good, but I feel like making the SOFT_LINK_NAMESPACE an argument > to SOFT_LINK_FRAMEWORK, etc., might be simpler. But it's fine as-is. > > > Source/WebCore/platform/cf/CoreMediaSoftLink.cpp:36 > > +SOFT_LINK_FRAMEWORK_SOURCE(CoreMedia) > > Why not just make SOFT_LINK_NAMESPACE an argument to > SOFT_LINK_FRAMEWORK_{SOURCE, HEADER}? It seemed like too much duplication to add that to every single call site. Let's chat in person, though!
David Kilzer (:ddkilzer)
Comment 10 2015-02-20 16:31:36 PST
(In reply to comment #9) > (In reply to comment #5) > > Comment on attachment 246994 [details] > > Patch v2 (for EWS builds) > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=246994&action=review > > > > This looks good, but I feel like making the SOFT_LINK_NAMESPACE an argument > > to SOFT_LINK_FRAMEWORK, etc., might be simpler. But it's fine as-is. > > > > > Source/WebCore/platform/cf/CoreMediaSoftLink.cpp:36 > > > +SOFT_LINK_FRAMEWORK_SOURCE(CoreMedia) > > > > Why not just make SOFT_LINK_NAMESPACE an argument to > > SOFT_LINK_FRAMEWORK_{SOURCE, HEADER}? > > It seemed like too much duplication to add that to every single call site. > > Let's chat in person, though! I will go ahead and add an argument for the namespace for all the macros instead of doing the mysterious #define/#undefine of SOFT_LINK_NAMESPACE before landing.
David Kilzer (:ddkilzer)
Comment 11 2015-02-20 19:19:43 PST
Created attachment 247034 [details] Patch v4 (for landing; test EWS builds)
WebKit Commit Bot
Comment 12 2015-02-20 19:21:10 PST
Attachment 247034 [details] did not pass style-queue: ERROR: Source/WebCore/platform/win/SoftLinking.h:205: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:315: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:328: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mac/SoftLinking.h:333: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 13 2015-02-20 19:41:50 PST
Comment on attachment 247034 [details] Patch v4 (for landing; test EWS builds) Looks great! r=me.
David Kilzer (:ddkilzer)
Comment 14 2015-02-20 20:09:35 PST
Note You need to log in before you can comment on or make changes to this bug.