<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>140608</bug_id>
          
          <creation_ts>2015-01-19 01:18:28 -0800</creation_ts>
          <short_desc>REGRESSION(r178527): It broke the !ENABLE(INSPECTOR) build</short_desc>
          <delta_ts>2015-01-21 09:39:02 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>140478</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>burg</cc>
    
    <cc>joepeck</cc>
    
    <cc>ossy</cc>
    
    <cc>timothy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1062291</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-19 01:18:28 -0800</bug_when>
    <thetext>../../Source/WebCore/page/PageConsoleClient.cpp: In member function &apos;void WebCore::PageConsoleClient::addMessage(JSC::MessageSource, JSC::MessageLevel, const WTF::String&amp;, const WTF::String&amp;, unsigned int, unsigned int, WTF::RefPtr&lt;Inspe
ctor::ScriptCallStack&gt;&amp;&amp;, JSC::ExecState*, long unsigned int)&apos;:
../../Source/WebCore/page/PageConsoleClient.cpp:127:25: error: invalid use of incomplete type &apos;class Inspector::ConsoleMessage&apos;
In file included from ../../Source/WebCore/inspector/InspectorConsoleInstrumentation.h:34:0,
                 from ../../Source/WebCore/page/PageConsoleClient.cpp:36:
../../Source/WebCore/inspector/InspectorInstrumentation.h:60:7: error: forward declaration of &apos;class Inspector::ConsoleMessage&apos;
../../Source/WebCore/page/PageConsoleClient.cpp:128:34: error: invalid use of incomplete type &apos;class Inspector::ConsoleMessage&apos;
In file included from ../../Source/WebCore/inspector/InspectorConsoleInstrumentation.h:34:0,
                 from ../../Source/WebCore/page/PageConsoleClient.cpp:36:
../../Source/WebCore/inspector/InspectorInstrumentation.h:60:7: error: forward declaration of &apos;class Inspector::ConsoleMessage&apos;
../../Source/WebCore/page/PageConsoleClient.cpp:129:36: error: invalid use of incomplete type &apos;class Inspector::ConsoleMessage&apos;
In file included from ../../Source/WebCore/inspector/InspectorConsoleInstrumentation.h:34:0,
                 from ../../Source/WebCore/page/PageConsoleClient.cpp:36:
../../Source/WebCore/inspector/InspectorInstrumentation.h:60:7: error: forward declaration of &apos;class Inspector::ConsoleMessage&apos;
...


The whole ConsoleMessage.h is guarded with ENABLE(INSPECTOR), but it is ununsed without guard in PageConsoleClient.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062311</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-19 02:18:47 -0800</bug_when>
    <thetext>Does r178527 mean that inspector is mandatory feature since now? 

If yes, let&apos;s remove the compile time guards and make it really mandatory.
If no, could you possibly give me any hint how to fix the build properly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062371</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-01-19 09:22:05 -0800</bug_when>
    <thetext>Given that we use the logic in Inspector::ConsoleMessage even when inspector is not enabled, yes, this logic needs to be always compiled in. I haven&apos;t looked into how much of other Inspector code it uses. Perhaps it can be factored out of Inspector::ConsoleMessage.

What is the rationale for disabling Inspector? The !ENABLE(INSPECTOR) build appears to be very high maintenance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062373</commentid>
    <comment_count>3</comment_count>
    <who name="Brian Burg">burg</who>
    <bug_when>2015-01-19 09:30:25 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Does r178527 mean that inspector is mandatory feature since now? 
&gt; 
&gt; If yes, let&apos;s remove the compile time guards and make it really mandatory.
&gt; If no, could you possibly give me any hint how to fix the build properly?

It seems that these are the only methods that actually require ENABLE(INSPECTOR), and are entry points from InspectorConsoleAgent:

    void addToFrontend(InspectorConsoleFrontendDispatcher*, InjectedScriptManager*, bool generatePreview);
    void updateRepeatCountInConsole(InspectorConsoleFrontendDispatcher*);

Plus IdentifiersFactory.h which looks to have no other Inspector dependencies. So you would need to remove the guard of the entire file and only surround those methods (and their static helper functions in the .cpp file).

Honestly, someone should request to webkit-dev to remove ENABLE(INSPECTOR) guards. There are no bots running this configuration, and I would be surprised if anyone contributing to trunk depends on it. If such a person exists, I would have expected to hear about these build breaks before Ossy found it via --minimal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062374</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-19 09:31:36 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Given that we use the logic in Inspector::ConsoleMessage even when inspector
&gt; is not enabled, yes, this logic needs to be always compiled in. I haven&apos;t
&gt; looked into how much of other Inspector code it uses. Perhaps it can be
&gt; factored out of Inspector::ConsoleMessage.
&gt; 
&gt; What is the rationale for disabling Inspector? The !ENABLE(INSPECTOR) build
&gt; appears to be very high maintenance.

It can be useful to reduce the binary codesize on embedded 
systems where you don&apos;t need inspector at all. 
( https://bugs.webkit.org/show_bug.cgi?id=140098#c5 )

I don&apos;t have strong opinion about it, but I don&apos;t like broken and unmaintained
ifdef guards. If we want to have a guard, we should maintain it, if we don&apos;t
want to maintain it, let&apos;s remove the guard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062375</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-19 09:32:26 -0800</bug_when>
    <thetext>(In reply to comment #3)

&gt; Honestly, someone should request to webkit-dev to remove ENABLE(INSPECTOR)
&gt; guards. There are no bots running this configuration, and I would be
&gt; surprised if anyone contributing to trunk depends on it. If such a person
&gt; exists, I would have expected to hear about these build breaks before Ossy
&gt; found it via --minimal.

Will send soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062377</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-19 09:45:01 -0800</bug_when>
    <thetext>webkit-dev mail sent: https://lists.webkit.org/pipermail/webkit-dev/2015-January/027153.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1063080</commentid>
    <comment_count>7</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-21 09:39:02 -0800</bug_when>
    <thetext>There is no !INSPECTOR build since http://trac.webkit.org/changeset/178820 .</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>