Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Unified Diff: ios/web/test/wk_web_view_crash_utils.mm

Issue 2239773002: Annotates functions returning retained objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removes functions that are not in headers AND not in ios code. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/web/test/wk_web_view_crash_utils.mm
diff --git a/ios/web/test/wk_web_view_crash_utils.mm b/ios/web/test/wk_web_view_crash_utils.mm
index 936dc3064c23d1fe747ef3e2e8ded6048dfe9779..a3f6fa28cf4fff490d36bf3bc765a9b5298d3327 100644
--- a/ios/web/test/wk_web_view_crash_utils.mm
+++ b/ios/web/test/wk_web_view_crash_utils.mm
@@ -20,7 +20,7 @@ namespace {
// Returns an OCMocked WKWebView whose |evaluateJavaScript:stringResultHandler:|
// method has been mocked to execute |block| instead. |block| cannot be nil.
WKWebView* CreateMockWKWebViewWithStubbedJSEvalFunction(
- void (^block)(NSInvocation*)) {
+ void (^block)(NSInvocation*)) NS_RETURNS_RETAINED {
DCHECK(block);
web::TestBrowserState browser_state;
base::scoped_nsobject<WKWebView> webView(
@@ -46,7 +46,7 @@ void SimulateWKWebViewCrash(WKWebView* webView) {
[webView performSelector:@selector(_processDidExit)];
}
-WKWebView* CreateTerminatedWKWebView() {
+WKWebView* CreateTerminatedWKWebView() NS_RETURNS_RETAINED {
id fail = ^void(NSInvocation* invocation) {
// Always fails with WKErrorWebContentProcessTerminated error.
NSError* error =
@@ -61,7 +61,7 @@ WKWebView* CreateTerminatedWKWebView() {
return CreateMockWKWebViewWithStubbedJSEvalFunction(fail);
}
-WKWebView* CreateHealthyWKWebView() {
+WKWebView* CreateHealthyWKWebView() NS_RETURNS_RETAINED {
id succeed = ^void(NSInvocation* invocation) {
void (^completionHandler)(id, NSError*) =
[invocation getArgumentAtIndexAsObject:3];

Powered by Google App Engine
This is Rietveld 408576698