Bug 31575

Summary: Fix WebKit build when JAVASCRIPT_DEBUGGER is disabled
Product: WebKit Reporter: Laszlo Gombos <laszlo.gombos>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dglazkov, dimich, eric, mnaganov, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Proposed fix
none
an easier way none

Description Laszlo Gombos 2009-11-16 22:01:40 PST
Building QtWebKit with --minimal will result in the following linker error:

WebKitBuildQt/Release/lib/libQtWebKit.so: undefined reference to `WebCore::JSConsole::profile(JSC::ExecState*, JSC::ArgList const&)'
WebKitBuildQt/Release/lib/libQtWebKit.so: undefined reference to `WebCore::JSConsole::profileEnd(JSC::ExecState*, JSC::ArgList const&)'

This is probably caused by r50933.
Comment 1 Mikhail Naganov 2009-11-17 12:40:03 PST
Created attachment 43377 [details]
Proposed fix

I tried to make 'console.profile()' and 'console.profileEnd()' declarations platform-dependent, but for some reason this doesn't work. So I took another route and made their implementations empty in the case when there is no debugger.

Laszlo, can you try your debuggerless Qt build with this patch, please?
Comment 2 Laszlo Gombos 2009-11-17 13:12:30 PST
I can confirm that the proposed patch builds for JSC + ENABLE_JAVASCRIPT_DEBUGGER=0 case (tested with build-webkit --qt --minimal)
Comment 3 Dmitry Titov 2009-11-18 00:08:45 PST
> I tried to make 'console.profile()' and 'console.profileEnd()' declarations
> platform-dependent, but for some reason this doesn't work. So I took another
> route and made their implementations empty in the case when there is no
> debugger.

It seems that defined(V8_BINDING) && V8_BINDING is the way used in IDL files to check if the bindings are generated for V8. It might be a cleaner way to do this.
Comment 4 Mikhail Naganov 2009-11-18 02:09:20 PST
Created attachment 43418 [details]
an easier way

Thanks, Dimich! That's really an easier way, and it works with Chromium.

Laszlo, can I ask you to test this patch, please? If it works for you, I'll find someone to review and submit it.
Comment 5 Eric Seidel (no email) 2009-11-18 15:35:07 PST
Comment on attachment 43418 [details]
an easier way

I don't understand why the chromium build doesn't define ENABLE_JAVASCRIPT_DEBUGGER.  Probably because ENABLE_JAVASCRIPT_DEBUGGER depends on JSC?  If that's the case then we really should come up with a define for the debugger which would not depend on JSC.
Comment 6 Eric Seidel (no email) 2009-11-18 15:37:10 PST
(I'm not sure who the JSC debugger expert is these days, but ccing Oliver so that someone in JSC land sees this go by.)
Comment 7 WebKit Commit Bot 2009-11-18 16:27:06 PST
Comment on attachment 43418 [details]
an easier way

Clearing flags on attachment: 43418

Committed r51153: <http://trac.webkit.org/changeset/51153>
Comment 8 WebKit Commit Bot 2009-11-18 16:27:14 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Laszlo Gombos 2009-11-18 22:14:48 PST
Thanks !
Comment 10 Mikhail Naganov 2009-11-18 23:56:57 PST
(In reply to comment #5)
> (From update of attachment 43418 [details])
> I don't understand why the chromium build doesn't define
> ENABLE_JAVASCRIPT_DEBUGGER.  Probably because ENABLE_JAVASCRIPT_DEBUGGER
> depends on JSC?  If that's the case then we really should come up with a define
> for the debugger which would not depend on JSC.

Yes, currently the code under ENABLE_JAVASCRIPT_DEBUGGER defines is tied directly to JSC, so it won't event compile in Chromium.