Bug 21333

Summary: Can't disable ENABLE_DASHBOARD or ENABLE_MAC_JAVA_BRIDGE on Mac
Product: WebKit Reporter: Mark Mentovai <mark>
Component: PlatformAssignee: Mark Mentovai <mark>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, manzasiamrama2, pinkerton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Wrap #defines in #ifndef
timothy: review-
Wrap #defines in #ifndef timothy: review+

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