[GTK] Errors when building WebKit2 with Clang
Created attachment 188047 [details] Patch
Hi ap -- could you take a look at the patch or point me to another WK2 owner that would be willing to?
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
Comment on attachment 188047 [details] Patch The GTK+ bits looks good to me.
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.
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++.
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.
Created attachment 188397 [details] Patch
Comment on attachment 188397 [details] Patch Thanks!
Comment on attachment 188397 [details] Patch Clearing flags on attachment: 188397 Committed r142908: <http://trac.webkit.org/changeset/142908>
All reviewed patches have been landed. Closing bug.