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

Unified Diff: ios/chrome/app/chrome_exe_main.mm

Issue 2887413002: [ObjC ARC] Converts ios/chrome/app:main to ARC. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « ios/chrome/app/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/chrome_exe_main.mm
diff --git a/ios/chrome/app/chrome_exe_main.mm b/ios/chrome/app/chrome_exe_main.mm
index b2cdcd3ddad8142182af51f843f97a0439a4ebc8..3a56dfa13d60350fac2057dd29739a601ff32240 100644
--- a/ios/chrome/app/chrome_exe_main.mm
+++ b/ios/chrome/app/chrome_exe_main.mm
@@ -12,6 +12,10 @@
#include "ios/chrome/browser/crash_report/crash_keys.h"
#include "ios/chrome/common/channel_info.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
NSString* const kUIApplicationDelegateInfoKey = @"UIApplicationDelegate";
@@ -28,7 +32,6 @@ void StartCrashController() {
int main(int argc, char* argv[]) {
IOSChromeMain::InitStartTime();
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults];
@@ -49,10 +52,6 @@ int main(int argc, char* argv[]) {
// Always ignore SIGPIPE. We check the return value of write().
CHECK_NE(SIG_ERR, signal(SIGPIPE, SIG_IGN));
- // Purging the pool to prevent autorelease objects created by the previous
- // calls to live forever.
rohitrao (ping after 24h) 2017/05/18 20:50:34 We added this autorelease pool for a specific reas
stkhapugin 2017/05/30 14:04:06 This should be replaced with @autoreleasepool in a
liaoyuke 2017/06/14 00:02:23 Have uploaded this parent CL: https://chromium-rev
- [pool release];
- pool = [[NSAutoreleasePool alloc] init];
// Part of code that requires us to specify which UIApplication delegate class
// to use by adding "UIApplicationDelegate" key to Info.plist file.
@@ -61,6 +60,5 @@ int main(int argc, char* argv[]) {
CHECK(delegateClassName);
int retVal = UIApplicationMain(argc, argv, nil, delegateClassName);
- [pool release];
return retVal;
}
« no previous file with comments | « ios/chrome/app/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698