<?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>39945</bug_id>
          
          <creation_ts>2010-05-31 02:12:47 -0700</creation_ts>
          <short_desc>Compilation error with clang in JSDOMBinding.h</short_desc>
          <delta_ts>2010-05-31 15:16:44 -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>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Olivier Goffart">ogoffart</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>ogoffart</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>232289</commentid>
    <comment_count>0</comment_count>
    <who name="Olivier Goffart">ogoffart</who>
    <bug_when>2010-05-31 02:12:47 -0700</bug_when>
    <thetext>webkit/WebCore/bindings/js/JSDOMBinding.h:229:20: error: no viable conversion from &apos;WebCore::JSNode *&apos; to &apos;JSC::JSValue&apos;

webkit/JavaScriptCore/runtime/JSValue.h:807:21: note: candidate constructor not viable: cannot convert argument of incomplete type &apos;WebCore::JSNode *&apos; to &apos;JSC::JSCell *&apos;
    inline JSValue::JSValue(JSCell* ptr)



     JSNode is only forward declared at this point. And since neither 
     &quot;wrapper&quot; nor JSValue are type-dependent. Compilers should report errors 
     at the first compilation pass. 
      
     The fix is to move the conversion the line above, as the call to the 
     function getCachedDOMNodeWrapper is type-dependent, the conversion will 
     happen at template-instantiation time. 
      
     See also http://llvm.org/bugs/show_bug.cgi?id=7244</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232290</commentid>
    <comment_count>1</comment_count>
      <attachid>57441</attachid>
    <who name="Olivier Goffart">ogoffart</who>
    <bug_when>2010-05-31 02:19:14 -0700</bug_when>
    <thetext>Created attachment 57441
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232291</commentid>
    <comment_count>2</comment_count>
      <attachid>57442</attachid>
    <who name="Olivier Goffart">ogoffart</who>
    <bug_when>2010-05-31 02:21:00 -0700</bug_when>
    <thetext>Created attachment 57442
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232294</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2010-05-31 02:25:50 -0700</bug_when>
    <thetext>Adding Oliver, he can probably review the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232432</commentid>
    <comment_count>4</comment_count>
      <attachid>57442</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2010-05-31 09:58:42 -0700</bug_when>
    <thetext>Comment on attachment 57442
Patch

Why doesn&apos;t this fail in gcc or msvc? (i&apos;m removing the r+ to prevent commit bot shenanigans till i understand thwe issue)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232437</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-05-31 10:10:54 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Why doesn&apos;t this fail in gcc or msvc? (i&apos;m removing the r+ to prevent commit bot shenanigans till i understand thwe issue)

Here’s my understanding: The older compilers don&apos;t implement as much checking at template-definition time as clang does. These older C++ compilers tended to treat templates more like macros and not do much checking on them until the template was instantiated. But the C++ standard allows (perhaps requires) additional checking at the time the template is defined.

On the other hand, I was led to believe that some folks have successfully compiled this code with at least some version of clang, so this may simply be a mistake in a certain version of clang rather than correct behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232458</commentid>
    <comment_count>6</comment_count>
      <attachid>57442</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2010-05-31 10:49:53 -0700</bug_when>
    <thetext>Comment on attachment 57442
Patch

r=me as well then</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232523</commentid>
    <comment_count>7</comment_count>
      <attachid>57442</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-05-31 15:16:37 -0700</bug_when>
    <thetext>Comment on attachment 57442
Patch

Clearing flags on attachment: 57442

Committed r60451: &lt;http://trac.webkit.org/changeset/60451&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232524</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-05-31 15:16:44 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>57441</attachid>
            <date>2010-05-31 02:19:14 -0700</date>
            <delta_ts>2010-05-31 02:21:00 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>url.txt</filename>
            <type>text/plain</type>
            <size>53</size>
            <attacher name="Olivier Goffart">ogoffart</attacher>
            
              <data encoding="base64">aHR0cDovL2NvZGVwYXN0ZXItbm9raWEudHJvbGwubm8vP2lkPTI5OTQzJmZvcm1hdD1yYXc=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>57442</attachid>
            <date>2010-05-31 02:21:00 -0700</date>
            <delta_ts>2010-05-31 15:16:37 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <size>1585</size>
            <attacher name="Olivier Goffart">ogoffart</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
YWNhODg2Yy4uYTRiY2Y1OSAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwyMyBAQAorMjAxMC0wNS0zMSAgT2xpdmllciBHb2Zm
YXJ0IDxvbGl2aWVyLmdvZmZhcnRAbm9raWEuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5P
Qk9EWSAoT09QUyEpLgorCisgICAgICAgIFtQQVRDSF0gY29tcGlsYXRpb24gZXJyb3Igd2l0aCBj
bGFuZyBpbiBKU0RPTUJpbmRpbmcuaAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9z
aG93X2J1Zy5jZ2k/aWQ9Mzk5NDUKKworICAgICAgICBKU05vZGUgaXMgb25seSBmb3J3YXJkIGRl
Y2xhcmVkIGF0IHRoaXMgcG9pbnQuIEFuZCBzaW5jZSBuZWl0aGVyCisgICAgICAgICJ3cmFwcGVy
IiBub3IgSlNWYWx1ZSBhcmUgdHlwZS1kZXBlbmRlbnQuIENvbXBpbGVycyBzaG91bGQgcmVwb3J0
IGVycm9ycworICAgICAgICBhdCB0aGUgZmlyc3QgY29tcGlsYXRpb24gcGFzcy4KKworICAgICAg
ICBUaGUgZml4IGlzIHRvIG1vdmUgdGhlIGNvbnZlcnNpb24gdGhlIGxpbmUgYWJvdmUsIGFzIHRo
ZSBjYWxsIHRvIHRoZQorICAgICAgICBmdW5jdGlvbiBnZXRDYWNoZWRET01Ob2RlV3JhcHBlciBp
cyB0eXBlLWRlcGVuZGVudCwgdGhlIGNvbnZlcnNpb24gd2lsbAorICAgICAgICBoYXBwZW4gYXQg
dGVtcGxhdGUtaW5zdGFudGlhdGlvbi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