Bug 80990

Summary: ENABLE_INSPECTOR flag is unavailable in .idl files
Product: WebKit Reporter: Max Vujovic <mvujovic>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: burg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

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.