Bug 18916 - make_names.pl --factory needs to support custom c++ guard
Summary: make_names.pl --factory needs to support custom c++ guard
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-06 16:42 PDT by Julien Chaffraix
Modified: 2008-05-08 17:07 PDT (History)
0 users

See Also:


Attachments
First try (6.80 KB, patch)
2008-05-06 16:46 PDT, Julien Chaffraix
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2008-05-06 16:42:14 PDT
Currently factories generated by make_names are protected by "ENABLE(SVG)" which should not be hardcoded but left as a command line option.
Comment 1 Julien Chaffraix 2008-05-06 16:46:01 PDT
Created attachment 20990 [details]
First try
Comment 2 Eric Seidel (no email) 2008-05-06 19:05:21 PDT
Comment on attachment 20990 [details]
First try

Looks good to me.

You can avoid checking guardFactory against "" everywhere by just inverting the if.  I think that "" is false in perl.  If its not, then you can do the "" check at the top, and assign guardFactory to some value which is false, like null.

it's OK as is, or with the further "" check cleanup.  I don't need to see the patch again before you land.

r=me.
Comment 3 Julien Chaffraix 2008-05-08 17:07:45 PDT
> You can avoid checking guardFactory against "" everywhere by just inverting the
> if.  I think that "" is false in perl.  If its not, then you can do the ""
> check at the top, and assign guardFactory to some value which is false, like
> null.
> 

I got confused by using 'unless' which is why I needed to check against the empty string. I switched to 'if' and cleaned up the patch as Eric suggested.

Committed in r32989.