Bug 62379

Summary: WebKit2: Generate correct header conditionals in message receivers.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Tools / TestsAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 62290    
Attachments:
Description Flags
Proposed patch
kling: review-
Proposed patch v2 none

Description Andreas Kling 2011-06-09 08:23:58 PDT
Given a *.messages.in file like this:

Bar(WebCore::IntRect rect)
#if ENABLE(ESOTERIC_FEATURE)
Foo(WebCore::IntRect rect)
#endif

messages.py would include the WebCore argument coders only #if ENABLE(ESOTERIC_FEATURE). This breaks the build on platforms without that defined.

It also breaks for this case:

#if ENABLE(FOO)
Foo(WebCore::IntRect rect)
#endif
#if ENABLE(BAR)
Bar(WebCore::IntRect rect)
#endif

Where we would get the include only #if ENABLE(FOO). This should be #if ENABLE(FOO) || ENABLE(BAR) instead.
Comment 1 Andreas Kling 2011-06-09 09:16:52 PDT
Created attachment 96595 [details]
Proposed patch
Comment 2 Andreas Kling 2011-06-09 09:27:35 PDT
Comment on attachment 96595 [details]
Proposed patch

Self r- due to missing unit test. Didn't notice we have those for messages.py. :)
Comment 3 Andreas Kling 2011-06-09 10:50:43 PDT
Created attachment 96604 [details]
Proposed patch v2
Comment 4 Andreas Kling 2011-06-09 11:14:28 PDT
Comment on attachment 96604 [details]
Proposed patch v2

Clearing flags on attachment: 96604

Committed r88462: <http://trac.webkit.org/changeset/88462>
Comment 5 Andreas Kling 2011-06-09 11:14:36 PDT
All reviewed patches have been landed.  Closing bug.