Bug 80990
Summary: | ENABLE_INSPECTOR flag is unavailable in .idl files | ||
---|---|---|---|
Product: | WebKit | Reporter: | Max Vujovic <mvujovic> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | burg |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Max Vujovic
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brian Burg
Use Conditional=INSPECTOR.