summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_browser_application_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chrome_browser_application_mac.mm')
-rw-r--r--chrome/browser/chrome_browser_application_mac.mm13
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm
index 7ba8cda..601d9c4 100644
--- a/chrome/browser/chrome_browser_application_mac.mm
+++ b/chrome/browser/chrome_browser_application_mac.mm
@@ -7,6 +7,7 @@
#import "base/logging.h"
#import "base/metrics/histogram.h"
#import "base/memory/scoped_nsobject.h"
+#include "base/sys_info.h"
#import "base/sys_string_conversions.h"
#import "chrome/app/breakpad_mac.h"
#import "chrome/browser/app_controller_mac.h"
@@ -194,9 +195,15 @@ 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.
- ObjcEvilDoers::ZombieEnable(YES, 10000);
+ // Whitelist releases that are compatible with objc zombies.
+ int32 major_version = 0, minor_version = 0, bugfix_version = 0;
+ base::SysInfo::OperatingSystemVersionNumbers(
+ &major_version, &minor_version, &bugfix_version);
+ if (major_version == 10 && (minor_version == 5 || minor_version == 6)) {
+ // Turn all deallocated Objective-C objects into zombies, keeping
+ // the most recent 10,000 of them on the treadmill.
+ ObjcEvilDoers::ZombieEnable(YES, 10000);
+ }
}
- init {