Add WKRetainPtr helper class as private header
Created attachment 53362 [details] patch
Attachment 53362 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebKit2/UIProcess/API/cpp/WKRetainPtr.h:95: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 53362 [details] patch > + > +#define DECLARE_RETAIN_RELEASE_OVERLOADS(WKType) \ > + inline void WKRetain(WKType##Ref p) { WKType##Retain(p); } \ > + inline void WKRelease(WKType##Ref p) { WKType##Release(p); } \ > + // end of macro > + > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKContext) > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKFrame) > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKFramePolicyListener) > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKPage) > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKPageNamespace) > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKPreferences) > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKString) > +DECLARE_RETAIN_RELEASE_OVERLOADS(WKURL) > + > +#undef DECLARE_RETAIN_RELEASE_OVERLOADS Could you add a fixme about adding these overloads to the respective headers (when compiling as C++). > +template <typename T> inline void WKRetainPtr<T>::adoptCF(PtrType optr) This shouldn't be here. > +template <typename T> inline void WKRetainPtr<T>::adoptNS(PtrType optr) Nor should this. Looks good otherwise! r=me
Landed in r57605.