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

Unified Diff: ios/web_view/internal/criwv.mm

Issue 2692603002: Convert //ios/web_view/internal to ARC. (Closed)
Patch Set: Created 3 years, 10 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_view/internal/criwv.mm
diff --git a/ios/web_view/internal/criwv.mm b/ios/web_view/internal/criwv.mm
index 7906852d5016a6a813b9df4c6b81b83d1718d86b..734208cfd66be93da580bded0b9e43ac9981ba0e 100644
--- a/ios/web_view/internal/criwv.mm
+++ b/ios/web_view/internal/criwv.mm
@@ -17,12 +17,16 @@
#import "ios/web_view/public/criwv_web_view_configuration.h"
#import "ios/web_view/public/criwv_website_data_store.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
CRIWV* g_criwv = nil;
}
@interface CRIWV () {
- id<CRIWVDelegate> _delegate;
+ __unsafe_unretained id<CRIWVDelegate> _delegate;
Eugene But (OOO till 7-30) 2017/02/10 23:07:22 Should this be __weak?
michaeldo 2017/02/11 06:02:32 I was basing this off the arc migrate instructions
std::unique_ptr<ios_web_view::CRIWVWebMainDelegate> _webMainDelegate;
std::unique_ptr<web::WebMain> _webMain;
}
@@ -37,7 +41,6 @@ CRIWV* g_criwv = nil;
}
+ (void)shutDown {
- [g_criwv release];
g_criwv = nil;
}
@@ -46,8 +49,7 @@ CRIWV* g_criwv = nil;
[[CRIWVWebViewConfiguration alloc] init];
configuration.websiteDataStore = [CRIWVWebsiteDataStore defaultDataStore];
- return [[[CRIWVWebView alloc] initWithFrame:frame configuration:configuration]
- autorelease];
+ return [[CRIWVWebView alloc] initWithFrame:frame configuration:configuration];
}
- (instancetype)initWithDelegate:(id<CRIWVDelegate>)delegate {
@@ -64,7 +66,6 @@ CRIWV* g_criwv = nil;
- (void)dealloc {
_webMain.reset();
_webMainDelegate.reset();
- [super dealloc];
}
@end

Powered by Google App Engine
This is Rietveld 408576698