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

Description Filip Pizlo 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.
Comment 1 Filip Pizlo 2013-03-18 16:26:53 PDT
Created attachment 193685 [details]
the patch
Comment 2 Michael Saboff 2013-03-18 16:29:25 PDT
Comment on attachment 193685 [details]
the patch

r=me
Comment 3 Roger Fong 2013-03-18 16:53:05 PDT
Comment on attachment 193685 [details]
the patch

Yup, tests pass now!
Comment 4 WebKit Review Bot 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>
Comment 5 WebKit Review Bot 2013-03-18 17:23:11 PDT
All reviewed patches have been landed.  Closing bug.