[Webkit-unassigned] [Bug 80990] New: ENABLE_INSPECTOR flag is unavailable in .idl files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 13 08:31:04 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=80990

           Summary: ENABLE_INSPECTOR flag is unavailable in .idl files
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mvujovic at adobe.com


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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list