Commit 86346d7c authored by mrowe@apple.com's avatar mrowe@apple.com

<http://webkit.org/b/122190> WebKit2 APIs returning CF and NS types should...

<http://webkit.org/b/122190> WebKit2 APIs returning CF and NS types should explicitly declare whether they return retained objects.

This make the APIs easier to use under ARC and can help out the static analyzer.

Reviewed by Anders Carlsson.

* Shared/API/c/cf/WKErrorCF.h:
* Shared/API/c/cf/WKStringCF.h:
* Shared/API/c/cf/WKURLCF.h:
* Shared/API/c/cg/WKImageCG.h:
* Shared/API/c/mac/WKURLRequestNS.h:
* Shared/API/c/mac/WKURLResponseNS.h:
* UIProcess/API/C/cg/WKIconDatabaseCG.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4132693e
2013-10-01 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/122190> WebKit2 APIs returning CF and NS types should explicitly declare whether they return retained objects.
This make the APIs easier to use under ARC and can help out the static analyzer.
Reviewed by Anders Carlsson.
* Shared/API/c/cf/WKErrorCF.h:
* Shared/API/c/cf/WKStringCF.h:
* Shared/API/c/cf/WKURLCF.h:
* Shared/API/c/cg/WKImageCG.h:
* Shared/API/c/mac/WKURLRequestNS.h:
* Shared/API/c/mac/WKURLResponseNS.h:
* UIProcess/API/C/cg/WKIconDatabaseCG.h:
2013-10-01 Gabor Abraham <abrhm@inf.u-szeged.hu>
[Qt][WK2] Fix build after r156688.
......
......@@ -34,7 +34,7 @@ extern "C" {
#endif
WK_EXPORT WKErrorRef WKErrorCreateWithCFError(CFErrorRef error);
WK_EXPORT CFErrorRef WKErrorCopyCFError(CFAllocatorRef alloc, WKErrorRef error);
WK_EXPORT CFErrorRef WKErrorCopyCFError(CFAllocatorRef alloc, WKErrorRef error) CF_RETURNS_RETAINED;
#ifdef __cplusplus
}
......
......@@ -34,7 +34,7 @@ extern "C" {
#endif
WK_EXPORT WKStringRef WKStringCreateWithCFString(CFStringRef string);
WK_EXPORT CFStringRef WKStringCopyCFString(CFAllocatorRef alloc, WKStringRef string);
WK_EXPORT CFStringRef WKStringCopyCFString(CFAllocatorRef alloc, WKStringRef string) CF_RETURNS_RETAINED;
#ifdef __cplusplus
}
......
......@@ -34,7 +34,7 @@ extern "C" {
#endif
WK_EXPORT WKURLRef WKURLCreateWithCFURL(CFURLRef URL);
WK_EXPORT CFURLRef WKURLCopyCFURL(CFAllocatorRef alloc, WKURLRef URL);
WK_EXPORT CFURLRef WKURLCopyCFURL(CFAllocatorRef alloc, WKURLRef URL) CF_RETURNS_RETAINED;
#ifdef __cplusplus
}
......
......@@ -34,7 +34,7 @@
extern "C" {
#endif
WK_EXPORT CGImageRef WKImageCreateCGImage(WKImageRef image);
WK_EXPORT CGImageRef WKImageCreateCGImage(WKImageRef image) CF_RETURNS_RETAINED;
WK_EXPORT WKImageRef WKImageCreateFromCGImage(CGImageRef imageRef, WKImageOptions options);
......
......@@ -34,7 +34,7 @@ extern "C" {
#endif
WK_EXPORT WKURLRequestRef WKURLRequestCreateWithNSURLRequest(NSURLRequest* urlRequest);
WK_EXPORT NSURLRequest* WKURLRequestCopyNSURLRequest(WKURLRequestRef urlRequest);
WK_EXPORT NSURLRequest* WKURLRequestCopyNSURLRequest(WKURLRequestRef urlRequest) NS_RETURNS_RETAINED;
#ifdef __cplusplus
}
......
......@@ -34,7 +34,7 @@ extern "C" {
#endif
WK_EXPORT WKURLResponseRef WKURLResponseCreateWithNSURLResponse(NSURLResponse* urlResponse);
WK_EXPORT NSURLResponse* WKURLResponseCopyNSURLResponse(WKURLResponseRef urlResponse);
WK_EXPORT NSURLResponse* WKURLResponseCopyNSURLResponse(WKURLResponseRef urlResponse) NS_RETURNS_RETAINED;
#ifdef __cplusplus
}
......
......@@ -36,7 +36,7 @@ extern "C" {
#endif
WK_EXPORT CGImageRef WKIconDatabaseTryGetCGImageForURL(WKIconDatabaseRef iconDatabase, WKURLRef url, WKSize size);
WK_EXPORT CFArrayRef WKIconDatabaseTryCopyCGImageArrayForURL(WKIconDatabaseRef iconDatabase, WKURLRef url);
WK_EXPORT CFArrayRef WKIconDatabaseTryCopyCGImageArrayForURL(WKIconDatabaseRef iconDatabase, WKURLRef url) CF_RETURNS_RETAINED;
#ifdef __cplusplus
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment