<?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>133785</bug_id>
          
          <creation_ts>2014-06-11 22:22:57 -0700</creation_ts>
          <short_desc>Fix build break on EFL port since r169869</short_desc>
          <delta_ts>2014-06-13 12:43:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>133779</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gyuyoung Kim">gyuyoung.kim</reporter>
          <assigned_to name="Gyuyoung Kim">gyuyoung.kim</assigned_to>
          <cc>aestes</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>ossy</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1015025</commentid>
    <comment_count>0</comment_count>
    <who name="Gyuyoung Kim">gyuyoung.kim</who>
    <bug_when>2014-06-11 22:22:57 -0700</bug_when>
    <thetext>There is build error since rr169869.

In file included from /mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:31:0,
                 from /mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:36:
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:96:5: error: &quot;TARGET_OS_IPHONE&quot; is not defined [-Werror=undef]
 #if TARGET_OS_IPHONE
     ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015026</commentid>
    <comment_count>1</comment_count>
      <attachid>232931</attachid>
    <who name="Gyuyoung Kim">gyuyoung.kim</who>
    <bug_when>2014-06-11 22:24:23 -0700</bug_when>
    <thetext>Created attachment 232931
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015028</commentid>
    <comment_count>2</comment_count>
      <attachid>232931</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-06-11 22:46:33 -0700</bug_when>
    <thetext>Comment on attachment 232931
Patch

Clearing flags on attachment: 232931

Committed r169879: &lt;http://trac.webkit.org/changeset/169879&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015029</commentid>
    <comment_count>3</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-06-11 22:46:41 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015035</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2014-06-11 23:13:09 -0700</bug_when>
    <thetext>Sorry for the breakage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015036</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-06-11 23:14:49 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Sorry for the breakage.

Not problem, unfortunately this fix broke Mac, but I&apos;ll land the proper fix immediately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015037</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-06-11 23:19:01 -0700</bug_when>
    <thetext>Fix landed in https://trac.webkit.org/changeset/169880</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015040</commentid>
    <comment_count>7</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2014-06-11 23:53:26 -0700</bug_when>
    <thetext>Why not just do this:

#if defined(TARGET_OS_IPHONE) &amp;&amp; TARGET_OS_IPHONE

On Apple platforms, TARGET_OS_IPHONE is always defined, it&apos;s just set to 0 on the Mac.

Also, in the .cpp file you can just use PLATFORM(IOS). TARGET_OS_IPHONE is only necessary in API headers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015042</commentid>
    <comment_count>8</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-06-11 23:56:41 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Why not just do this: 
&gt; #if defined(TARGET_OS_IPHONE) &amp;&amp; TARGET_OS_IPHONE

It was the first idea, but unfortunately GCC&apos;s preprocessor doesn&apos;t do short
circuit macro evaluation, and the build fails when it tries to evaluate the
non defined right side of &amp;&amp;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015043</commentid>
    <comment_count>9</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2014-06-11 23:58:20 -0700</bug_when>
    <thetext>&gt; It was the first idea, but unfortunately GCC&apos;s preprocessor doesn&apos;t do short circuit macro evaluation

I didn&apos;t know that! Thanks for the explanation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015135</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2014-06-12 09:41:37 -0700</bug_when>
    <thetext>This fix broke Mac port, fixed in r169900.

&gt; It was the first idea, but unfortunately GCC&apos;s preprocessor doesn&apos;t do short circuit macro evaluation

This is very surprising, because we&apos;ve always used this technique, even before switching to clang.

&gt; Fix landed in https://trac.webkit.org/changeset/169880

This patch had [EFL][GTK] in its title despite touching cross-platform files. This confused me for a moment.

These bracketed prefixes are intended for bugs and patches that don&apos;t touch cross-platform code at all, making them of zero interest to people who don&apos;t work on the particular platform. For example, adding code in an #if doesn&apos;t qualify, because it could be introducing a design problem that will make refactoring cross-platorfm code harder.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015352</commentid>
    <comment_count>11</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-06-13 01:05:16 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; This fix broke Mac port, fixed in r169900.

Sorry for the breakage, unfortunately we haven&apos;t noticed it.

+1 for having a buildstep for this and having style checker 
against c++ style comments in Platform.h ( Bug133802 )

&gt; &gt; It was the first idea, but unfortunately GCC&apos;s preprocessor doesn&apos;t do short circuit macro evaluation
&gt; 
&gt; This is very surprising, because we&apos;ve always used this technique, even before switching to clang.

After checking it in details, you are true. In this case the short circuit
evaluation really works fine with all of my installed GCC version.

I confused because of a similar problem, where it doesn&apos;t work at all:
test.cpp:5:45: error: missing binary operator before token &quot;(&quot;
#if defined(__has_include) &amp;&amp;  __has_include(&lt;stdio.h&gt;)
                                            ^
Here only nested ifs help for GCC users.

&gt; This patch had [EFL][GTK] in its title despite touching cross-platform files. This confused me for a moment.
&gt; 
&gt; These bracketed prefixes are intended for bugs and patches that don&apos;t touch cross-platform code at all, making them of zero interest to people who don&apos;t work on the particular platform. For example, adding code in an #if doesn&apos;t qualify, because it could be introducing a design problem that will make refactoring cross-platorfm code harder.

It&apos;s new for me, as far as I remember everybody use [GTK]/[EFL]/[Mac]/[iOS]/[iOS][WK2] title prefix for bugs which touches cross platform files, but surely (or likely) has no effect for other platforms. I remember many [iOS] and [Mac] prefixed bug which touched cross platform code and broke other 
platform. I&apos;m not against the rule you mentioned, it could help us.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015353</commentid>
    <comment_count>12</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-06-13 01:16:06 -0700</bug_when>
    <thetext>Let&apos;s go back to the original problem for a minute. The problem was adding 
new &quot;#if TARGET_OS_IPHONE&quot; guards which caused undef warning(=error). I
don&apos;t want to expect using &quot;#if defined(TARGET_OS_IPHONE) &amp;&amp; TARGET_OS_IPHONE&quot;
always in the future. I&apos;m pretty sure if folks will forget it sometimes and
will break the GCC builds accidentally again and again. 

That&apos;s why I added the false definition for TARGET_OS_IPHONE on EFL and GTK.
If you don&apos;t have objection, I would add back a c style comment to Platform.h
like:
/* To avoid possible build breakages because of undefined TARGET_OS_IPHONE */</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015498</commentid>
    <comment_count>13</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2014-06-13 12:43:51 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; Let&apos;s go back to the original problem for a minute. The problem was adding 
&gt; new &quot;#if TARGET_OS_IPHONE&quot; guards which caused undef warning(=error). I
&gt; don&apos;t want to expect using &quot;#if defined(TARGET_OS_IPHONE) &amp;&amp; TARGET_OS_IPHONE&quot;
&gt; always in the future. I&apos;m pretty sure if folks will forget it sometimes and
&gt; will break the GCC builds accidentally again and again. 

I don&apos;t think this situation will arise very often. We only use TARGET_OS_IPHONE in API headers since those headers are included in translation units that don&apos;t use our prefix header. In all other places, we&apos;ll use PLATFORM(IOS). Further, only a subset of our API headers are cross-platform (e.g. the Cocoa API headers are only used on Apple platforms), and API headers don&apos;t tend to change as often as other files in the project.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>232931</attachid>
            <date>2014-06-11 22:24:23 -0700</date>
            <delta_ts>2014-06-11 22:46:33 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-133785-20140612142358.patch</filename>
            <type>text/plain</type>
            <size>2435</size>
            <attacher name="Gyuyoung Kim">gyuyoung.kim</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTY5ODc3CmRpZmYgLS1naXQgYS9Tb3VyY2U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