Bug 112639

Summary: JSC_NATIVE_FUNCTION() takes an identifier for the name and then uses #name, which is unsafe if name was already #define'd to something else
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, roger_fong, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch none

Filip Pizlo
Reported 2013-03-18 16:25:39 PDT
In this case, we have Windows #define'ing 'small' to be something other than 'small', and StringPrototype does: JSC_NATIVE_FUNCTION(small, stringProtoFuncSmall, DontEnum, 0); The solution is to make JSC_NATIVE_FUNCTION just take a C string directly.
Attachments
the patch (9.69 KB, patch)
2013-03-18 16:26 PDT, Filip Pizlo
no flags
Filip Pizlo
Comment 1 2013-03-18 16:26:53 PDT
Created attachment 193685 [details] the patch
Michael Saboff
Comment 2 2013-03-18 16:29:25 PDT
Comment on attachment 193685 [details] the patch r=me
Roger Fong
Comment 3 2013-03-18 16:53:05 PDT
Comment on attachment 193685 [details] the patch Yup, tests pass now!
WebKit Review Bot
Comment 4 2013-03-18 17:23:08 PDT
Comment on attachment 193685 [details] the patch Clearing flags on attachment: 193685 Committed r146157: <http://trac.webkit.org/changeset/146157>
WebKit Review Bot
Comment 5 2013-03-18 17:23:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.