WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56198
WebCore/loader/appcache/ApplicationCacheGroup fails to compile on S10/SS12
https://bugs.webkit.org/show_bug.cgi?id=56198
Summary
WebCore/loader/appcache/ApplicationCacheGroup fails to compile on S10/SS12
Ben Taylor
Reported
2011-03-11 08:58:37 PST
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->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() && m_calledReachedMaxAppCacheSize); 776 } 777 778 RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? 0 : m_newestCache; 779 "loader/appcache/ApplicationCache.cpp", line 778: Error: Ambiguous "?:" expression, second operand of type "int" and third operand of type "WTF::RefPtr<WebCore::ApplicationCache>" 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() && m_calledReachedMaxAppCacheSize); } - RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? 0 : m_newestCache; + RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? RefPtr<ApplicationCache>() : m_newestCache; setNewestCache(m_cacheBeingUpdated.release()); if (cacheStorage().storeNewestCache(this)) {
Attachments
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler
(1.52 KB, patch)
2011-03-11 14:30 PST
,
Ben Taylor
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2011-03-11 11:44:20 PST
I would suggest replacing the ?: with an if instead. Please see <
http://www.webkit.org/coding/contributing.html
> for information about contributing code to WebKit.
Ben Taylor
Comment 2
2011-03-11 14:30:20 PST
Created
attachment 85534
[details]
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.
Alexey Proskuryakov
Comment 3
2011-03-11 14:52:04 PST
Comment on
attachment 85534
[details]
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.
WebKit Commit Bot
Comment 4
2011-03-11 16:34:15 PST
Comment on
attachment 85534
[details]
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
: <
http://trac.webkit.org/changeset/80903
>
WebKit Commit Bot
Comment 5
2011-03-11 16:34:20 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug