RESOLVED FIXED Bug 80990
ENABLE_INSPECTOR flag is unavailable in .idl files
https://bugs.webkit.org/show_bug.cgi?id=80990
Summary ENABLE_INSPECTOR flag is unavailable in .idl files
Max Vujovic
Reported 2012-03-13 08:31:05 PDT
In Internals.idl (under WebCore), when I add a block like this: #if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR ... #endif The block is never entered, even with a build that includes the inspector (e.g. running "Tools/Scripts/build-webkit"). The block should be entered. Interestingly, in a .cpp or .h file, a block like the following works properly: #if ENABLE(INSPECTOR) ... #endif So far, it seems the workaround has been to use "#if ENABLE(INSPECTOR)" blocks within the bodies of inspector-related functions, such as: void InternalSettings::setInspectorResourcesDataSizeLimits(int maximumResourcesContentSize, int maximumSingleResourceContentSize, ExceptionCode& ec) { #if ENABLE(INSPECTOR) if (!page() || !page()->inspectorController()) { ec = INVALID_ACCESS_ERR; return; } page()->inspectorController()->setResourcesDataSizeLimitsFromInternals(maximumResourcesContentSize, maximumSingleResourceContentSize); #else UNUSED_PARAM(maximumResourcesContentSize); UNUSED_PARAM(maximumSingleResourceContentSize); UNUSED_PARAM(ec); #endif } This works, but ideally, we'd like the "setInspectorResourcesDataSizeLimits" method to be undefined when the inspector isn't present by wrapping it with an #if/#endif block in the .idl file.
Attachments
Brian Burg
Comment 1 2014-12-17 16:37:54 PST
Use Conditional=INSPECTOR.
Note You need to log in before you can comment on or make changes to this bug.