<?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>56198</bug_id>
          
          <creation_ts>2011-03-11 08:58:37 -0800</creation_ts>
          <short_desc>WebCore/loader/appcache/ApplicationCacheGroup fails to compile on S10/SS12</short_desc>
          <delta_ts>2011-03-11 16:34:20 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Other</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>0</everconfirmed>
          <reporter name="Ben Taylor">bentaylor.solx86</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>commit-queue</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>366025</commentid>
    <comment_count>0</comment_count>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-03-11 08:58:37 -0800</bug_when>
    <thetext>qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp

Solaris 10, Sun Studio 12 (SS12) C++ compiler


   767          ASSERT(m_cacheBeingUpdated);
   768          if (m_manifestResource)
   769              m_cacheBeingUpdated-&gt;setManifestResource(m_manifestResource.release());
   770          else {
   771              // We can get here as a result of retrying the Complete step, following
   772              // a failure of the cache storage to save the newest cache due to hitting
   773              // the maximum size. In such a case, m_manifestResource may be 0, as
   774              // the manifest was already set on the newest cache object.
   775              ASSERT(cacheStorage().isMaximumSizeReached() &amp;&amp; m_calledReachedMaxAppCacheSize);
   776          }
   777
   778          RefPtr&lt;ApplicationCache&gt; oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? 0 : m_newestCache;
   779

&quot;loader/appcache/ApplicationCache.cpp&quot;, line 778: Error: Ambiguous &quot;?:&quot; expression, second operand of type &quot;int&quot; and third operand of type &quot;WTF::RefPtr&lt;WebCore::ApplicationCache&gt;&quot; can be converted to one another.

The Sun Studio 12 C++ compiler does not like having to accept 0 untyped when the other conditional is typed.

The following patch makes the compilation error go away.

--- qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp.ORIG       2011-03-09 15:16:41.124515331
+0000
+++ qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp    2011-03-09 14:50:54.718120159 +0000
@@ -775,7 +775,7 @@
             ASSERT(cacheStorage().isMaximumSizeReached() &amp;&amp; m_calledReachedMaxAppCacheSize);
         }

-        RefPtr&lt;ApplicationCache&gt; oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? 0 : m_newestCache;
+        RefPtr&lt;ApplicationCache&gt; oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? RefPtr&lt;ApplicationCache&gt;() : m_newestCache;

         setNewestCache(m_cacheBeingUpdated.release());
         if (cacheStorage().storeNewestCache(this)) {</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366174</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-11 11:44:20 -0800</bug_when>
    <thetext>I would suggest replacing the ?: with an if instead.

Please see &lt;http://www.webkit.org/coding/contributing.html&gt; for information about contributing code to WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366319</commentid>
    <comment_count>2</comment_count>
      <attachid>85534</attachid>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-03-11 14:30:20 -0800</bug_when>
    <thetext>Created attachment 85534
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler

This fix is against webkit head, but works for the webkit distributed with qt-4.7.1.  Other attempts to structure the patch as an if/then clause were unsuccessful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366336</commentid>
    <comment_count>3</comment_count>
      <attachid>85534</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-11 14:52:04 -0800</bug_when>
    <thetext>Comment on attachment 85534
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler

OK. Some of the EWS bots are badly lagging, but for this kind of change, its enough that a few of them are green. Commit queue should land this automatically in a day or two.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366415</commentid>
    <comment_count>4</comment_count>
      <attachid>85534</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-11 16:34:15 -0800</bug_when>
    <thetext>Comment on attachment 85534
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler

Clearing flags on attachment: 85534

Committed r80903: &lt;http://trac.webkit.org/changeset/80903&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366416</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-11 16:34:20 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>85534</attachid>
            <date>2011-03-11 14:30:20 -0800</date>
            <delta_ts>2011-03-11 16:34:14 -0800</delta_ts>
            <desc>Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler</desc>
            <filename>wk-ApplicationCacheGroup.cpp.diff</filename>
            <type>text/plain</type>
            <size>1557</size>
            <attacher name="Ben Taylor">bentaylor.solx86</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDgwODg1KQorKysgU291cmNlL1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTUgQEAKKzIwMTEtMDMtMTEgIEJlbiBUYXls
b3IgIDxiZW50YXlsb3Iuc29seDg2QGdtYWlsLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBO
T0JPRFkgKE9PUFMhKS4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9NTYxOTgKKyAgICAgICAgRml4IGNvbmRpdGlvbmFsIHdoaWNoIGhhZCBhbiBpbnQg
Zm9yIG9uZSBjYXNlIGFuZCBhIHBvaW50ZXIgZm9yIGFub3RoZXIuCisKKyAgICAgICAgTm8gbmV3
IHRlc3RzLiBGaXggY29tcGlsYXRpb24gb24gU29sYXJpcyAxMCB3aXRoIFN1blN0dWRpbyAxMiBD
KysKKworICAgICAgICAqIGxvYWRlci9hcHBjYWNoZS9BcHBsaWNhdGlvbkNhY2hlR3JvdXAuY3Bw
OgorICAgICAgICAoV2ViQ29yZTo6QXBwbGljYXRpb25DYWNoZUdyb3VwOjpjaGVja0lmTG9hZElz
Q29tcGxldGUpOgorCiAyMDExLTAzLTExICBEYXZpZCBIeWF0dCAgPGh5YXR0QGFwcGxlLmNvbT4K
IAogICAgICAgICBSZXZpZXdlZCBieSBTaW1vbiBGcmFzZXIuCkluZGV4OiBTb3VyY2UvV2ViQ29y
ZS9sb2FkZXIvYXBwY2FjaGUvQXBwbGljYXRpb25DYWNoZUdyb3VwLmNwcAo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t
LSBTb3VyY2UvV2ViQ29yZS9sb2FkZXIvYXBwY2FjaGUvQXBwbGljYXRpb25DYWNoZUdyb3VwLmNw
cAkocmV2aXNpb24gODA4ODEpCisrKyBTb3VyY2UvV2ViQ29yZS9sb2FkZXIvYXBwY2FjaGUvQXBw
bGljYXRpb25DYWNoZUdyb3VwLmNwcAkod29ya2luZyBjb3B5KQpAQCAtODY2LDcgKzg2Niw3IEBA
CiAgICAgICAgIH0KIAogICAgICAgICBBcHBsaWNhdGlvbkNhY2hlU3RvcmFnZTo6RmFpbHVyZVJl
YXNvbiBmYWlsdXJlUmVhc29uOwotICAgICAgICBSZWZQdHI8QXBwbGljYXRpb25DYWNoZT4gb2xk
TmV3ZXN0Q2FjaGUgPSAobV9uZXdlc3RDYWNoZSA9PSBtX2NhY2hlQmVpbmdVcGRhdGVkKSA/IDAg
OiBtX25ld2VzdENhY2hlOworICAgICAgICBSZWZQdHI8QXBwbGljYXRpb25DYWNoZT4gb2xkTmV3
ZXN0Q2FjaGUgPSAobV9uZXdlc3RDYWNoZSA9PSBtX2NhY2hlQmVpbmdVcGRhdGVkKSA/IFJlZlB0
cjxBcHBsaWNhdGlvbkNhY2hlPigpIDogbV9uZXdlc3RDYWNoZTsKICAgICAgICAgc2V0TmV3ZXN0
Q2FjaGUobV9jYWNoZUJlaW5nVXBkYXRlZC5yZWxlYXNlKCkpOwogICAgICAgICBpZiAoY2FjaGVT
dG9yYWdlKCkuc3RvcmVOZXdlc3RDYWNoZSh0aGlzLCBvbGROZXdlc3RDYWNoZS5nZXQoKSwgZmFp
bHVyZVJlYXNvbikpIHsKICAgICAgICAgICAgIC8vIE5ldyBjYWNoZSBzdG9yZWQsIG5vdyByZW1v
dmUgdGhlIG9sZCBjYWNoZS4K
</data>

          </attachment>
      

    </bug>

</bugzilla>