<?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>50985</bug_id>
          
          <creation_ts>2010-12-13 15:12:16 -0800</creation_ts>
          <short_desc>[chromium] useless warnings when building on Windows</short_desc>
          <delta_ts>2010-12-16 17:53:04 -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>Other</rep_platform>
          <op_sys>OS X 10.5</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="Evan Martin">evan</reporter>
          <assigned_to name="Evan Martin">evan</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>dglazkov</cc>
    
    <cc>fishd</cc>
    
    <cc>pkasting</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>321474</commentid>
    <comment_count>0</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2010-12-13 15:12:16 -0800</bug_when>
    <thetext>[chromium] useless warnings when building on Windows</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>321475</commentid>
    <comment_count>1</comment_count>
      <attachid>76451</attachid>
    <who name="Evan Martin">evan</who>
    <bug_when>2010-12-13 15:13:13 -0800</bug_when>
    <thetext>Created attachment 76451
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>321477</commentid>
    <comment_count>2</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2010-12-13 15:15:15 -0800</bug_when>
    <thetext>CC&apos;ing Peter since I think he cares about this.


Here are the two warnings I&apos;m disabling.  One of other warnings I was seeing was a real bug (!) and I&apos;ve filed that separately (I&apos;m not disabling that warning, obviously).

e:\b\build\slave\win\build\src\third_party\webkit\javascriptcore\wtf\text\StringImpl.h(92) : warning C4355: &apos;this&apos; : used in base member initializer list

e:\b\build\slave\win\build\src\third_party\webkit\javascriptcore\wtf\RefPtrHashMap.h(176) : warning C4344: behavior change: use of explicit template arguments results in call to &apos;WTF::HashTableIterator&lt;Key,Value,Extractor,HashFunctions,Traits,KeyTraits&gt; WTF::HashTable&lt;Key,Value,Extractor,HashFunctions,Traits,KeyTraits&gt;::find&lt;WebCore::FilterEffect*,WTF::RefPtrHashMapRawKeyTranslator&lt;RawKeyType,ValueType,ValueTraits,HashFunctions&gt;&gt;(const T &amp;)&apos;
        with
        [
            Key=WTF::RefPtr&lt;WebCore::FilterEffect&gt;,
            Value=std::pair&lt;WTF::RefPtr&lt;WebCore::FilterEffect&gt;,WTF::HashSet&lt;WebCore::FilterEffect *&gt;&gt;,
            Extractor=WTF::PairFirstExtractor&lt;std::pair&lt;WTF::RefPtr&lt;WebCore::FilterEffect&gt;,WTF::HashSet&lt;WebCore::FilterEffect *&gt;&gt;&gt;,
            HashFunctions=WTF::PtrHash&lt;WTF::RefPtr&lt;WebCore::FilterEffect&gt;&gt;,
            Traits=WTF::PairHashTraits&lt;WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::FilterEffect&gt;&gt;,WTF::HashTraits&lt;WebCore::SVGFilterBuilder::FilterEffectSet&gt;&gt;,
            KeyTraits=WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::FilterEffect&gt;&gt;,
            RawKeyType=WebCore::FilterEffect *,
            ValueType=std::pair&lt;WTF::RefPtr&lt;WebCore::FilterEffect&gt;,WTF::HashSet&lt;WebCore::FilterEffect *&gt;&gt;,
            ValueTraits=WTF::PairHashTraits&lt;WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::FilterEffect&gt;&gt;,WTF::HashTraits&lt;WebCore::SVGFilterBuilder::FilterEffectSet&gt;&gt;,
            T=WebCore::FilterEffect *
        ]
        but the regular function &apos;WTF::HashTableIterator&lt;Key,Value,Extractor,HashFunctions,Traits,KeyTraits&gt; WTF::HashTable&lt;Key,Value,Extractor,HashFunctions,Traits,KeyTraits&gt;::find(const WTF::RefPtr&lt;T&gt; &amp;)&apos; is a better match
        with


Here is a trybot run with my patch.  It appears the files weren&apos;t rebuilt.  I&apos;m not sure the patch works.  :\

http://build.chromium.org/p/tryserver.chromium/builders/win/builds/6555/steps/compile/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>321570</commentid>
    <comment_count>3</comment_count>
      <attachid>76451</attachid>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2010-12-13 17:29:27 -0800</bug_when>
    <thetext>Comment on attachment 76451
Patch

The first warning has been discussed quite a bit in Chromium land and we&apos;ve repeatedly concluded we shouldn&apos;t disable it, but rather annotate safe uses, because it does catch real bugs.  I think the same should apply here.

I&apos;m not sure what the second warning means.  I&apos;d like to understand better.  Help?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322079</commentid>
    <comment_count>4</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2010-12-14 11:41:32 -0800</bug_when>
    <thetext>We already disable the first warning in most of this code (see 4355 below):

JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:134:      &apos;msvs_disabled_warnings&apos;: [4127, 4355, 4510, 4512, 4610, 4706],

All I&apos;m doing here is extending the disabling to other users within WebKit of this header.



I believe the second warning is when we&apos;re doing something like
  foo&lt;Bar, Baz&gt;(blah);
and the warning is saying that if we called
  foo(blah);
the template it would&apos;ve chosen would&apos;ve been different.  I assume this is intentional.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322082</commentid>
    <comment_count>5</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2010-12-14 11:48:06 -0800</bug_when>
    <thetext>To elaborate on the second point, I believe it is saying that the default template would&apos;ve used a RefPtr (see the second to last line with &quot;a better match&quot;) while the code explicitly uses the raw ptr, presumably to reduce refcount traffic.  I think the warning is a pretty weird one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322141</commentid>
    <comment_count>6</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2010-12-14 13:03:50 -0800</bug_when>
    <thetext>I won&apos;t r- you again, but I still feel like if we disable the &quot;this&quot; warning in JSC and not elsewhere, the right fix is to un-disable it in JSC and fix the instances of it.  This one is pretty easy to fix and I&apos;d hope the number of instances are small enough that we can audit them to ensure they&apos;re safe.

As for the other warning, I concur with your reading of the warning text that it&apos;s saying it would normally have passed by const RefPtr&lt;T&gt;&amp; and we&apos;re instead passing by const T&amp;.  Someone like Darin Adler should probably look to make sure that&apos;s the right thing for that code to be doing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322164</commentid>
    <comment_count>7</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2010-12-14 13:33:43 -0800</bug_when>
    <thetext>I attempted to find the origin of that warning-hiding, but it dates back to us landing the gyp files in WebKit.  So I think we&apos;ve effectively always built with that warning disabled.  I&apos;d be ok with someone wanting to re-enable that warning and fix webkit, but I think it&apos;s out of the scope of this bug.


Regarding the RefPtr warning, it&apos;s kind of clearer if you look at the code:

    template&lt;typename T, typename U, typename V, typename W, typename X&gt;
    inline typename HashMap&lt;RefPtr&lt;T&gt;, U, V, W, X&gt;::iterator HashMap&lt;RefPtr&lt;T&gt;, U, V, W, X&gt;::find(RawKeyType key)
    {
        return m_impl.template find&lt;RawKeyType, RawKeyTranslator&gt;(key);
    }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322841</commentid>
    <comment_count>8</comment_count>
      <attachid>76451</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-12-15 15:15:17 -0800</bug_when>
    <thetext>Comment on attachment 76451
Patch

Oops.  Wrong bug.  Sorry for the noise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323456</commentid>
    <comment_count>9</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2010-12-16 15:25:47 -0800</bug_when>
    <thetext>CC list: need a review, not sure how to get one, can you help?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323488</commentid>
    <comment_count>10</comment_count>
      <attachid>76451</attachid>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2010-12-16 16:01:02 -0800</bug_when>
    <thetext>Comment on attachment 76451
Patch

WebKit code uses &apos;this&apos; in initializer lists pretty freely.  I think it is reasonable to
suppress this warning consistently in WebKit.  I also think it is reasonable to raise
this issue for discussion on #webkit to see if folks have interest in introducing a
macro like Chromium&apos;s ALLOW_THIS_IN_INITIALIZER_LIST.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323546</commentid>
    <comment_count>11</comment_count>
      <attachid>76451</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-12-16 17:52:58 -0800</bug_when>
    <thetext>Comment on attachment 76451
Patch

Clearing flags on attachment: 76451

Committed r74221: &lt;http://trac.webkit.org/changeset/74221&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323547</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-12-16 17:53:04 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>76451</attachid>
            <date>2010-12-13 15:13:13 -0800</date>
            <delta_ts>2010-12-16 17:52:58 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-50985-20101213151219.patch</filename>
            <type>text/plain</type>
            <size>1579</size>
            <attacher name="Evan Martin">evan</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0phdmFTY3JpcHRDb3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0MjRhNjQzNTc5ZjhkYmIzZmUzZGI2MDM4Nzk4Li5kNzVmY2NmYzIzODNk
MzJmZTFhNTA2ODI3NWVjYTRkNDU2Y2U2ZWRmIDEwMDY0NAotLS0gYS9KYXZhU2NyaXB0Q29yZS9K
YXZhU2NyaXB0Q29yZS5neXAvSmF2YVNjcmlwdENvcmUuZ3lwCisrKyBiL0phdmFTY3JpcHRDb3Jl
L0phdmFTY3JpcHRDb3JlLmd5cC9KYXZhU2NyaXB0Q29yZS5neXAKQEAgLTEyNSw2ICsxMjUsMTYg
QEAKICAgICAgICAgICAnLi4vJywKICAgICAgICAgICAnLi4vd3RmJywKICAgICAgICAgXSwKKyAg
ICAgICAgIyBTb21lIHdhcm5pbmdzIG9jY3VyIGluIEpTQyBoZWFkZXJzLCBzbyB0aGV5IG11c3Qg
YWxzbyBiZSBkaXNhYmxlZAorICAgICAgICAjIGluIHRhcmdldHMgdGhhdCB1c2UgSlNDLgorICAg
ICAgICAnbXN2c19kaXNhYmxlZF93YXJuaW5ncyc6IFsKKyAgICAgICAgICAjIERvbid0IGNvbXBs
YWluIGFib3V0IGNhbGxpbmcgc3BlY2lmaWMgdmVyc2lvbnMgb2YgdGVtcGxhdGl6ZWQKKyAgICAg
ICAgICAjIGZ1bmN0aW9ucyAoZS5nLiBpbiBSZWZQdHJIYXNoTWFwLmgpLgorICAgICAgICAgIDQz
NDQsCisgICAgICAgICAgIyBEb24ndCBjb21wbGFpbiBhYm91dCB1c2luZyAidGhpcyIgaW4gYW4g
aW5pdGlhbGl6ZXIgbGlzdAorICAgICAgICAgICMgKGUuZy4gaW4gU3RyaW5nSW1wbC5oKS4KKyAg
ICAgICAgICA0MzU1LAorICAgICAgICBdLAogICAgICAgfSwKICAgICAgICdleHBvcnRfZGVwZW5k
ZW50X3NldHRpbmdzJzogWwogICAgICAgICAnd3RmX2NvbmZpZycsCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>