RESOLVED FIXED 21338
IDL files use #if defined(ENABLE_whatever) instead of #if ENABLE_whatever
https://bugs.webkit.org/show_bug.cgi?id=21338
Summary IDL files use #if defined(ENABLE_whatever) instead of #if ENABLE_whatever
Mark Mentovai
Reported 2008-10-03 11:48:26 PDT
IDL files use #if defined(ENABLE_whatever) instead of #if ENABLE(whatever). This is a problem now that JavaScriptCore/wtf/Platform.h provides definitions for features that are supposed to be disabled, and features that are supposed to be disabled are properly #defined to 0. For example, in Chromium, we want WebKit database support off, and build with -DENABLE_DATABASE=0, but files like WebCore/page/DOMWindow.idl check for: #if defined(ENABLE_DATABASE) Because ENABLE_DATABASE is #defined (although to 0), the preprocessor allows the conditionalized section in. The check should be changed to: #if ENABLE(DATABASE)
Attachments
grep -r ^#if.\*ENABLE_ . (6.26 KB, patch)
2008-10-03 12:58 PDT, Mark Mentovai
timothy: review-
grep -r ^#if.\*ENABLE . (6.33 KB, patch)
2008-10-06 13:26 PDT, Mark Mentovai
timothy: review+
Mark Mentovai
Comment 1 2008-10-03 12:13:12 PDT
Followup: the IDL files should use #if ENABLE_WHATEVER directly, because they are preprocessed without wtf/Platform.h being included, and the ENABLE() macro is not available.
Mark Mentovai
Comment 2 2008-10-03 12:58:29 PDT
Created attachment 24064 [details] grep -r ^#if.\*ENABLE_ . I tested this out in a regular WebKit Mac build, and it seems to do what's expected of it.
Timothy Hatcher
Comment 3 2008-10-03 19:13:03 PDT
Comment on attachment 24064 [details] grep -r ^#if.\*ENABLE_ . Change is fine but please add a description and bug url to the changelog.
Mark Mentovai
Comment 4 2008-10-06 13:26:06 PDT
Created attachment 24120 [details] grep -r ^#if.\*ENABLE .
Eric Seidel (no email)
Comment 5 2008-10-06 18:14:17 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/bindings/objc/DOMEvents.h M WebCore/bindings/objc/PublicDOMInterfaces.h M WebCore/dom/Document.idl M WebCore/page/DOMWindow.idl M WebCore/svg/svgtags.in Committed r37362
Note You need to log in before you can comment on or make changes to this bug.