[webkit-reviews] review granted: [Bug 127706] Scrub WebKit API headers of WTF macros : [Attachment 222353] Stop the code generator from adding ENABLE() macros to Objective-C DOM headers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 27 14:30:07 PST 2014
David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has granted Andy Estes
<aestes at apple.com>'s request for review:
Bug 127706: Scrub WebKit API headers of WTF macros
https://bugs.webkit.org/show_bug.cgi?id=127706
Attachment 222353: Stop the code generator from adding ENABLE() macros to
Objective-C DOM headers
https://bugs.webkit.org/attachment.cgi?id=222353&action=review
------- Additional Comments from David Kilzer (:ddkilzer) <ddkilzer at webkit.org>
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});
More information about the webkit-reviews
mailing list