[webkit-reviews] review granted: [Bug 37603] Add WKRetainPtr helper class as private header : [Attachment 53362] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 14 13:57:59 PDT 2010
Anders Carlsson <andersca at apple.com> has granted Sam Weinig <sam at webkit.org>'s
request for review:
Bug 37603: Add WKRetainPtr helper class as private header
https://bugs.webkit.org/show_bug.cgi?id=37603
Attachment 53362: patch
https://bugs.webkit.org/attachment.cgi?id=53362&action=review
------- Additional Comments from Anders Carlsson <andersca at apple.com>
> +
> +#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
More information about the webkit-reviews
mailing list