Bug 112639 - 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
Summary: JSC_NATIVE_FUNCTION() takes an identifier for the name and then uses #name, w...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-18 16:25 PDT by Filip Pizlo
Modified: 2013-03-18 17:23 PDT (History)
9 users (show)

See Also:


Attachments
the patch (9.69 KB, patch)
2013-03-18 16:26 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.