Chromium Code Reviews| Index: chrome/common/mac/objc_zombie.mm |
| diff --git a/chrome/common/mac/objc_zombie.mm b/chrome/common/mac/objc_zombie.mm |
| index 452aa6f5b34e629a790172970ce33ea05dc3ff0e..18803b6d5b59a7c286580c5706f308f32fcebf46 100644 |
| --- a/chrome/common/mac/objc_zombie.mm |
| +++ b/chrome/common/mac/objc_zombie.mm |
| @@ -450,7 +450,7 @@ bool ZombieEnable(bool zombieAllObjects, |
| size_t zombieCount) { |
| // Only allow enable/disable on the main thread, just to keep things |
| // simple. |
| - DCHECK([NSThread isMainThread]); |
| + CHECK([NSThread isMainThread]); |
|
Mark Mentovai
2011/11/05 00:49:02
Can this one stay D?
Scott Hess - ex-Googler
2011/11/08 18:47:51
Done.
|
| if (!ZombieInit()) |
| return false; |
| @@ -527,15 +527,16 @@ bool ZombieEnable(bool zombieAllObjects, |
| void ZombieDisable() { |
| // Only allow enable/disable on the main thread, just to keep things |
| // simple. |
| - DCHECK([NSThread isMainThread]); |
| + CHECK([NSThread isMainThread]); |
|
Mark Mentovai
2011/11/05 00:49:02
This too?
Scott Hess - ex-Googler
2011/11/08 18:47:51
Done.
|
| // |ZombieInit()| was never called. |
| if (!g_originalDeallocIMP) |
| return; |
| - // Put back the original implementation of -[NSObject dealloc]. |
| + // Put back the original implementation of -[NSObject dealloc]. If |
| + // the replacement is missing, things are fubar. |
| Method m = class_getInstanceMethod([NSObject class], @selector(dealloc)); |
| - DCHECK(m); |
| + CHECK(m); |
|
Mark Mentovai
2011/11/05 00:49:02
This too? If m is 0, the next line will either cra
Scott Hess - ex-Googler
2011/11/08 18:47:51
Done.
|
| method_setImplementation(m, g_originalDeallocIMP); |
| // Can safely grab this because it only happens on the main thread. |