[Webkit-unassigned] [Bug 32024] [GTK] WebKit does not compile without JAVASCRIPT_DEBUGGER

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 4 11:05:33 PST 2009


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


Gyuyoung Kim <gyuyoung at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #44192|0                           |1
        is obsolete|                            |
  Attachment #44192|review?                     |
               Flag|                            |




--- Comment #7 from Gyuyoung Kim <gyuyoung at gmail.com>  2009-12-04 11:05:33 PST ---
Created an attachment (id=44323)
 --> (https://bugs.webkit.org/attachment.cgi?id=44323)
 patch for the build error when JAVASCRIPT_DEBUGGER is disabled on gtk

I have tried to solve the build breaks. As I mentioned in description, there
are two cases of error. First, there are build errors as below when the
javascript-debugger is disabled in configure(./configure
--enable-javascript-debugger=no).

WebCore/bindings/js/JSConsoleCustom.cpp:42: error: no ‘JSC::JSValue
WebCore::JSConsole::profiles(JSC::ExecState*) const’ member function declared
in class ‘WebCore::JSConsole’
WebCore/bindings/js/JSConsoleCustom.cpp:54: error: no ‘JSC::JSValue
WebCore::JSConsole::profile(JSC::ExecState*, const JSC::ArgList&)’ member
function declared in class ‘WebCore::JSConsole’
WebCore/bindings/js/JSConsoleCustom.cpp:62: error: no ‘JSC::JSValue
WebCore::JSConsole::profileEnd(JSC::ExecState*, const JSC::ArgList&)’ member
function declared in class ‘WebCore::JSConsole’
make[1]: *** [WebCore/bindings/js/libWebCore_la-JSConsoleCustom.lo] Error 1
make[1]: Leaving directory `/home/gyuyoung/workspace/WebKit'
make: *** [all] Error 2

I think that JSConsole.h of DerivedSources doesn't make the
JSConsole::profiles() because of the configure setting, but JSConsoleCustom.cpp
still compiles the JSConsole::profiles(), which are wrapped by
JAVASCRIPT_DEBUGGER as below,

#if ENABLE(JAVASCRIPT_DEBUGGER)

typedef Vector<RefPtr<JSC::Profile> > ProfilesArray;

JSValue JSConsole::profiles(ExecState* exec) const
{
    const ProfilesArray& profiles = impl()->profiles();
    MarkedArgumentBuffer list;

    ProfilesArray::const_iterator end = profiles.end();
    for (ProfilesArray::const_iterator iter = profiles.begin(); iter != end;
++iter)
        list.append(toJS(exec, iter->get()));

    return constructArray(exec, list);
}
...
#endif

The reason is that JAVASCRIPT_DEBUGGER macro is enabled by Platform.h as below,

679 #if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
680 #define ENABLE_JAVASCRIPT_DEBUGGER 1
681 #endif

Upper condition means that if ENABLE_JAVASCRIPT_DEBUGGER is not defined, the
ENABLE_JAVASCRIPT_DEBUGGER should be enabled.
(It seems the ENABLE_JAVASCRIPT_DEBUGGER is enabled by WebCore/GNUmakefile.am
when it is set as "yes" in configure) 
I think this make the build errors even though the "javascript-debugger" is
disabled by configure.

IMO, why don't we make the ENABLE_JAVASCRIPT_DEBUGGER set as 0(disable) when it
is not defined ? If user sets the javascript-debugger as "no", it means that
user doesn't want to use it. So, I think the feature can be disabled as
default.

BTW, even if the macro is set as 0 basically, as mentioned in description,
there are still build breaks as below,

-f "WebKit/gtk/webkit/.deps/libwebkit_1_0_la-webkitwebinspector.Tpo"; exit 1;
fi
WebKit/gtk/webkit/webkitwebinspector.cpp: In function 'void
webkit_web_inspector_set_property(GObject*, guint, const GValue*,
GParamSpec*)':
WebKit/gtk/webkit/webkitwebinspector.cpp:353: error: 'class
WebCore::InspectorController' has no member named 'enableProfiler'
WebKit/gtk/webkit/webkitwebinspector.cpp:355: error: 'class
WebCore::InspectorController' has no member named 'disableProfiler'
WebKit/gtk/webkit/webkitwebinspector.cpp: In function 'void
webkit_web_inspector_get_property(GObject*, guint, GValue*, GParamSpec*)':
WebKit/gtk/webkit/webkitwebinspector.cpp:388: error: 'class
WebCore::InspectorController' has no member named 'profilerEnabled'
make[1]: *** [WebKit/gtk/webkit/libwebkit_1_0_la-webkitwebinspector.lo] Error 1
make[1]: Leaving directory `/root/workspace/WebKit'
make: *** [all] Error 2

Tpo" "WebKit/gtk/webkit/.deps/libwebkit_1_0_la-webkitwebinspector.Plo"; else rm
-f "WebKit/gtk/webkit/.deps/libwebkit_1_0_la-webkitwebinspector.Tpo"; exit 1;
fi
WebKit/gtk/webkit/webkitwebinspector.cpp: In function 'void
webkit_web_inspector_get_property(GObject*, guint, GValue*, GParamSpec*)':
WebKit/gtk/webkit/webkitwebinspector.cpp:388: error: 'class
WebCore::InspectorController' has no member named 'profilerEnabled'
make[1]: *** [WebKit/gtk/webkit/libwebkit_1_0_la-webkitwebinspector.lo] Error 1
make[1]: Leaving directory `/root/workspace/WebKit'
make: *** [all] Error 2

The webkitwebinspector.cpp invokes some functions related to
JAVASCRIPT_DEBUGGER macro regardless of enabling/disabling it.

I make a patch for it. Please review it.

-- 
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