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

Unified Diff: chrome/browser/chrome_browser_application_mac.mm

Issue 660411: [Mac] Implement NSObject zombies. (Closed)
Patch Set: Nits, and only enable in DEBUG for now. Created 10 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 | « no previous file | chrome/browser/cocoa/objc_zombie.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_application_mac.mm
diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm
index 07aac53f61336ed25515423373492810fa6012f3..6e171fd46fdaa31b6cca2295c23b467cb6a9f978 100644
--- a/chrome/browser/chrome_browser_application_mac.mm
+++ b/chrome/browser/chrome_browser_application_mac.mm
@@ -11,6 +11,7 @@
#import "chrome/app/breakpad_mac.h"
#import "chrome/browser/app_controller_mac.h"
#import "chrome/browser/cocoa/objc_method_swizzle.h"
+#import "chrome/browser/cocoa/objc_zombie.h"
// The implementation of NSExceptions break various assumptions in the
// Chrome code. This category defines a replacement for
@@ -161,6 +162,12 @@ BOOL SwizzleNSExceptionInit() {
@implementation BrowserCrApplication
++ (void)initialize {
+ // Turn all deallocated Objective-C objects into zombies, keeping
+ // the most recent 10,000 of them on the treadmill.
+ DCHECK(ObjcEvilDoers::ZombieEnable(YES, 10000));
+}
+
- init {
DCHECK(SwizzleNSExceptionInit());
return [super init];
« no previous file with comments | « no previous file | chrome/browser/cocoa/objc_zombie.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698