RESOLVED FIXED 109603
[GTK] Errors when building WebKit2 with Clang
https://bugs.webkit.org/show_bug.cgi?id=109603
Summary [GTK] Errors when building WebKit2 with Clang
Zan Dobersek
Reported 2013-02-12 12:10:46 PST
[GTK] Errors when building WebKit2 with Clang
Attachments
Patch (5.35 KB, patch)
2013-02-13 03:06 PST, Zan Dobersek
no flags
Patch (5.17 KB, patch)
2013-02-14 12:09 PST, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2013-02-13 03:06:53 PST
Zan Dobersek
Comment 2 2013-02-13 03:09:28 PST
Hi ap -- could you take a look at the patch or point me to another WK2 owner that would be willing to?
WebKit Review Bot
Comment 3 2013-02-13 03:18:23 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Martin Robinson
Comment 4 2013-02-13 05:52:06 PST
Comment on attachment 188047 [details] Patch The GTK+ bits looks good to me.
Alexey Proskuryakov
Comment 5 2013-02-13 09:41:14 PST
Comment on attachment 188047 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188047&action=review > Source/WebKit2/ChangeLog:13 > + * UIProcess/Authentication/WebCredential.h: Include the WebCertificateInfo.h and remove the forward declaration. Clang > + was throwing build errors because of the incomplete type used in a RefPtr member of the WebCredential class, these > + changes fix that. What were the errors? I think that it's generally fine to use an incomplete type in a RefPtr, and obviously, we successfully build this code with clang on Mac.
Zan Dobersek
Comment 6 2013-02-13 12:49:20 PST
In file included from ../../Source/WebKit2/UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp:21: In file included from ../../Source/WebKit2/UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h:23: In file included from ../../Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h:30: In file included from ./DerivedSources/WebKit2/include/WebCore/AuthenticationChallenge.h:1: In file included from ../../Source/WebCore/platform/network/soup/AuthenticationChallenge.h:28: In file included from ../../Source/WebCore/platform/network/AuthenticationChallengeBase.h:28: In file included from ../../Source/WebCore/platform/network/Credential.h:28: In file included from ../../Source/WTF/wtf/text/WTFString.h:29: In file included from ../../Source/WTF/wtf/text/StringImpl.h:31: In file included from ../../Source/WTF/wtf/Vector.h:31: In file included from ../../Source/WTF/wtf/VectorTraits.h:25: In file included from ../../Source/WTF/wtf/RefPtr.h:28: ../../Source/WTF/wtf/PassRefPtr.h:53:16: error: member access into incomplete type 'WebKit::WebCertificateInfo' ptr->deref(); ^ ../../Source/WTF/wtf/RefPtr.h:56:35: note: in instantiation of function template specialization 'WTF::derefIfNotNull<WebKit::WebCertificateInfo>' requested here ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); } ^ ../../Source/WebKit2/UIProcess/Authentication/WebCredential.h:40:7: note: in instantiation of member function 'WTF::RefPtr<WebKit::WebCertificateInfo>::~RefPtr' requested here class WebCredential : public APIObject { ^ ../../Source/WebKit2/UIProcess/Authentication/WebCredential.h:38:7: note: forward declaration of 'WebKit::WebCertificateInfo' class WebCertificateInfo; ^ 1 error generated. Using Clang 3.0 with libstdc++.
Alexey Proskuryakov
Comment 7 2013-02-13 13:40:46 PST
I think that the right fix for that would be to have a non-generated destructor in the class, and to implement it in a .cpp file.
Zan Dobersek
Comment 8 2013-02-14 12:09:43 PST
Zan Dobersek
Comment 9 2013-02-14 13:41:08 PST
Comment on attachment 188397 [details] Patch Thanks!
Zan Dobersek
Comment 10 2013-02-14 13:41:45 PST
Comment on attachment 188397 [details] Patch Clearing flags on attachment: 188397 Committed r142908: <http://trac.webkit.org/changeset/142908>
Zan Dobersek
Comment 11 2013-02-14 13:41:50 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.