Bug 21333 - Can't disable ENABLE_DASHBOARD or ENABLE_MAC_JAVA_BRIDGE on Mac
Summary: Can't disable ENABLE_DASHBOARD or ENABLE_MAC_JAVA_BRIDGE on Mac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Mark Mentovai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-03 07:24 PDT by Mark Mentovai
Modified: 2008-10-06 18:15 PDT (History)
2 users (show)

See Also:


Attachments
Wrap #defines in #ifndef (1.05 KB, patch)
2008-10-03 07:46 PDT, Mark Mentovai
timothy: review-
Details | Formatted Diff | Diff
Wrap #defines in #ifndef (1.12 KB, patch)
2008-10-06 13:24 PDT, Mark Mentovai
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Mentovai 2008-10-03 07:24:55 PDT
JavaScriptCore/wtf/Platform.h defines a bunch of ENABLE_* macros, which turn features on and off.  Most of these #defines are wrapped in #if !defined blocks, which allows the Platform.h definitions to serve as defaults, but lets external definitions override them.

In Chromium, we want to build with ENABLE_DASHBOARD=0, but this is not possible on the Mac because Platform.h does:

#if PLATFORM(MAC)
#define ENABLE_DASHBOARD 1
#endif

This results in a macro redefinition and is not what we want.  I propose wrapping the ENABLE_DASHBOARD and ENABLE_MAC_JAVA_BRIDGE macros in #if !defined blocks like all other ENABLE_ macros in Platform.h.
Comment 1 Mark Mentovai 2008-10-03 07:46:40 PDT
Created attachment 24051 [details]
Wrap #defines in #ifndef
Comment 2 Timothy Hatcher 2008-10-03 19:15:43 PDT
Comment on attachment 24051 [details]
Wrap #defines in #ifndef

Change is fine but please add a description and bug url to the ChangeLog.
Comment 3 Mark Mentovai 2008-10-06 13:24:57 PDT
Created attachment 24119 [details]
Wrap #defines in #ifndef
Comment 4 Eric Seidel (no email) 2008-10-06 18:15:52 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/wtf/Platform.h
Committed r37363