<?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>107845</bug_id>
          
          <creation_ts>2013-01-24 11:05:14 -0800</creation_ts>
          <short_desc>Disable Clang&apos;s -Wreturn-type-c-linkage for Source/WebCore/bindings/v8/</short_desc>
          <delta_ts>2013-01-29 12:50:38 -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>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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hans Wennborg">hans</reporter>
          <assigned_to name="Hans Wennborg">hans</assigned_to>
          <cc>abarth</cc>
    
    <cc>darin</cc>
    
    <cc>thakis</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>815628</commentid>
    <comment_count>0</comment_count>
    <who name="Hans Wennborg">hans</who>
    <bug_when>2013-01-24 11:05:14 -0800</bug_when>
    <thetext>Disable Clang&apos;s -Wreturn-type-c-linkage for Source/WebCore/bindings/v8/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815631</commentid>
    <comment_count>1</comment_count>
      <attachid>184534</attachid>
    <who name="Hans Wennborg">hans</who>
    <bug_when>2013-01-24 11:08:33 -0800</bug_when>
    <thetext>Created attachment 184534
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815638</commentid>
    <comment_count>2</comment_count>
    <who name="Hans Wennborg">hans</who>
    <bug_when>2013-01-24 11:11:37 -0800</bug_when>
    <thetext>Nico: can you check that I got the gyp stuff right?
Abarth: would you like to do the formal review?


The warning this suppresses looks like this:

../../third_party/WebKit/Source/WebCore/bindings/v8/npruntime.cpp:359:21: error: &apos;liveObjectMap&apos; has C-linkage specified, but returns user-defined type &apos;NPObjectMap &amp;&apos; (aka &apos;HashMap&lt;NPObject *, NPObject *&gt; &amp;&apos;) which is incompatible with C [-Werror,-Wreturn-type-c-linkage]
static NPObjectMap&amp; liveObjectMap()
                    ^
../../third_party/WebKit/Source/WebCore/bindings/v8/npruntime.cpp:367:25: error: &apos;rootObjectMap&apos; has C-linkage specified, but returns user-defined type &apos;NPRootObjectMap &amp;&apos; (aka &apos;HashMap&lt;NPObject *, NPObjectSet *&gt; &amp;&apos;) which is incompatible with C [-Werror,-Wreturn-type-c-linkage]
static NPRootObjectMap&amp; rootObjectMap()
                        ^

(See also Chromium&apos;s http://crbug.com/171432)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815641</commentid>
    <comment_count>3</comment_count>
    <who name="Nico Weber">thakis</who>
    <bug_when>2013-01-24 11:16:22 -0800</bug_when>
    <thetext>lgtm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816174</commentid>
    <comment_count>4</comment_count>
      <attachid>184534</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2013-01-24 21:22:36 -0800</bug_when>
    <thetext>Comment on attachment 184534
Patch

Ok.  Should we fix the code in npruntime.cpp anyway?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816175</commentid>
    <comment_count>5</comment_count>
      <attachid>184534</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-01-24 21:24:48 -0800</bug_when>
    <thetext>Comment on attachment 184534
Patch

Rejecting attachment 184534 from commit-queue.

Failed to run &quot;[&apos;/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch&apos;, &apos;--status-host=queues.webkit.org&apos;, &apos;--bot-id=gce-cq-04&apos;, &apos;apply-attachment&apos;, &apos;--no-update&apos;, &apos;--non-interactive&apos;, 184534, &apos;--port=chromium-xvfb&apos;]&quot; exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:
5.
Failed to run &quot;[u&apos;/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply&apos;, &apos;--force&apos;, &apos;--reviewer&apos;, &apos;Adam Barth&apos;]&quot; exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Parsed 2 diffs from patch file(s).
patch: **** Can&apos;t create file /tmp/pp81mPPi : No space left on device
patch: **** Can&apos;t create file /tmp/ppQInq0l : No space left on device

Failed to run &quot;[u&apos;/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply&apos;, &apos;--force&apos;, &apos;--reviewer&apos;, &apos;Adam Barth&apos;]&quot; exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/16110484</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816379</commentid>
    <comment_count>6</comment_count>
    <who name="Hans Wennborg">hans</who>
    <bug_when>2013-01-25 01:37:28 -0800</bug_when>
    <thetext>Committed r140800: &lt;http://trac.webkit.org/changeset/140800&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816383</commentid>
    <comment_count>7</comment_count>
    <who name="Hans Wennborg">hans</who>
    <bug_when>2013-01-25 01:41:54 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 184534 [details])
&gt; Ok.  Should we fix the code in npruntime.cpp anyway?

I&apos;m not convinced the warning makes sense here (the functions are static, so can only be called from the current file, i.e. C++ code). We&apos;re discussing it on the Clang mailing list.

My hope is that we&apos;ll fix the warning, otherwise I&apos;ll change the code. In any case the suppression is temporary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>819016</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-01-29 09:28:14 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #4)
&gt; &gt; Ok.  Should we fix the code in npruntime.cpp anyway?
&gt; 
&gt; I&apos;m not convinced the warning makes sense here (the functions are static, so can only be called from the current file, i.e. C++ code). We&apos;re discussing it on the Clang mailing list.

I see no reason to have these internal-linkage functions in npruntime.cpp use C linkage. I would prefer that we fix the problem even if the clang folks decide to eliminate the warning.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>819231</commentid>
    <comment_count>9</comment_count>
    <who name="Nico Weber">thakis</who>
    <bug_when>2013-01-29 12:50:38 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; Ok.  Should we fix the code in npruntime.cpp anyway?
&gt; &gt; 
&gt; &gt; I&apos;m not convinced the warning makes sense here (the functions are static, so can only be called from the current file, i.e. C++ code). We&apos;re discussing it on the Clang mailing list.
&gt; 
&gt; I see no reason to have these internal-linkage functions in npruntime.cpp use C linkage. I would prefer that we fix the problem even if the clang folks decide to eliminate the warning.

I&apos;m doing this in bug 108218.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>184534</attachid>
            <date>2013-01-24 11:08:33 -0800</date>
            <delta_ts>2013-01-24 21:24:48 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-107845-20130124190525.patch</filename>
            <type>text/plain</type>
            <size>1816</size>
            <attacher name="Hans Wennborg">hans</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQwNjkyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggYjFjOGY5NjljYWMwODVi
MTJmMDM4Y2JjMmY0YWFkZDViYzBiMGUxOC4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AgICAgICAgIF0sCisg
ICAgICAgICAgfQorICAgICAgICB9XSwKICAgICAgIF0sCiAgICAgfSwKICAgICB7Cg==
</data>
<flag name="review"
          id="203297"
          type_id="1"
          status="+"
          setter="abarth"
    />
    <flag name="commit-queue"
          id="203298"
          type_id="3"
          status="-"
          setter="webkit.review.bot"
    />
          </attachment>
      

    </bug>

</bugzilla>