Bug 128573

Summary: messages.py doesn't handle parameters with more than one level of scope.
Product: WebKit Reporter: Jeremy Jones <jeremyj-wk>
Component: WebKit2Assignee: Jeremy Jones <jeremyj-wk>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jonlee, mmaxfield, rniwa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 128564    
Attachments:
Description Flags
Patch
none
Patch none

Description Jeremy Jones 2014-02-10 19:02:20 PST
messages.py failed if you have a message like:

SetVideoLayerID(WebCore::GraphicsLayer::PlatformLayerID videoLayerID)

It fails generating a header because there are too many parameters to the sting formatting operator:

            headers.append('<%s/%s.h>' % tuple(split))

Where split is (WebCore, GraphicsLayer, PlatformLayerID)
Comment 1 Jeremy Jones 2014-02-10 19:05:14 PST
Created attachment 223788 [details]
Patch
Comment 2 Jeremy Jones 2014-02-10 21:33:13 PST
  File "/Volumes/Data/Code/WebKit/OpenSource/Source/WebKit2/Scripts/webkit2/messages.py", line 473, in headers_for_type

TypeError: not all arguments converted during string formatting

    headers.append('<%s/%s.h>' % tuple(split))
Comment 3 Simon Fraser (smfr) 2014-02-10 22:01:39 PST
Comment on attachment 223788 [details]
Patch

You should probably add a test for this. There are tests in the same directory.
Comment 4 Jeremy Jones 2014-02-11 09:13:41 PST
(In reply to comment #3)
> (From update of attachment 223788 [details])
> You should probably add a test for this. There are tests in the same directory.

Thanks. I'll do that.
Comment 5 Jeremy Jones 2014-02-11 11:57:11 PST
Created attachment 223888 [details]
Patch
Comment 6 WebKit Commit Bot 2014-02-15 01:22:53 PST
Comment on attachment 223888 [details]
Patch

Clearing flags on attachment: 223888

Committed r164171: <http://trac.webkit.org/changeset/164171>
Comment 7 WebKit Commit Bot 2014-02-15 01:22:55 PST
All reviewed patches have been landed.  Closing bug.