RESOLVED FIXED 127706
Scrub WebKit API headers of WTF macros
https://bugs.webkit.org/show_bug.cgi?id=127706
Summary Scrub WebKit API headers of WTF macros
Andy Estes
Reported 2014-01-27 13:46:49 PST
WebKit Public/Private headers shouldn't use WTF preprocessor macros such as PLATFORM(), ENABLE(), USE(), etc. I'll do this in two stages: 1) Stop the code generator from adding ENABLE() macros to Objective-C DOM headers. 2) Manually scrub non-generated exported headers
Attachments
Stop the code generator from adding ENABLE() macros to Objective-C DOM headers (9.38 KB, patch)
2014-01-27 13:57 PST, Andy Estes
no flags
Scrub WebKit API headers of WTF macros (39.48 KB, patch)
2014-01-27 15:35 PST, Andy Estes
ddkilzer: review+
Andy Estes
Comment 1 2014-01-27 13:48:11 PST
Andy Estes
Comment 2 2014-01-27 13:57:22 PST
Created attachment 222353 [details] Stop the code generator from adding ENABLE() macros to Objective-C DOM headers
David Kilzer (:ddkilzer)
Comment 3 2014-01-27 14:27:33 PST
Comment on attachment 222353 [details] Stop the code generator from adding ENABLE() macros to Objective-C DOM headers View in context: https://bugs.webkit.org/attachment.cgi?id=222353&action=review r=me > Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm:800 > + my %defines = map { $_ => 1 } split(/\s+/, $definesString); It would be better to do this in GenerateHeader and pass in the hash than to recreate it every time. You can do this by declaring a subroutine prototype at the "top" of the perl script: sub ConditionalIsEnabled(\%$); and then add the argument prototypes above: sub ConditionalIsEnabled(\%$) { Then call it using: ConditionalIsEnabled(%defines, $mystring) > Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm:803 > + return exists($defines{"ENABLE_" . $conditional}); If making the change above, this becomes: return exists($defines->{"ENABLE_" . $conditional});
Andy Estes
Comment 4 2014-01-27 15:11:06 PST
Andy Estes
Comment 5 2014-01-27 15:35:09 PST
Created attachment 222370 [details] Scrub WebKit API headers of WTF macros
David Kilzer (:ddkilzer)
Comment 6 2014-01-27 15:48:40 PST
Comment on attachment 222370 [details] Scrub WebKit API headers of WTF macros r=me
Andy Estes
Comment 7 2014-01-27 15:57:00 PST
Note You need to log in before you can comment on or make changes to this bug.