| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_CRASH_CORE_COMMON_OBJC_ZOMBIE_H_ | 5 #ifndef COMPONENTS_CRASH_CORE_COMMON_OBJC_ZOMBIE_H_ |
| 6 #define COMPONENTS_CRASH_CORE_COMMON_OBJC_ZOMBIE_H_ | 6 #define COMPONENTS_CRASH_CORE_COMMON_OBJC_ZOMBIE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include <stddef.h> |
| 9 |
| 10 #include "build/build_config.h" |
| 9 | 11 |
| 10 // You should think twice every single time you use anything from this | 12 // You should think twice every single time you use anything from this |
| 11 // namespace. | 13 // namespace. |
| 12 namespace ObjcEvilDoers { | 14 namespace ObjcEvilDoers { |
| 13 | 15 |
| 14 // Enable zombie object debugging. This implements a variant of Apple's | 16 // Enable zombie object debugging. This implements a variant of Apple's |
| 15 // NSZombieEnabled which can help expose use-after-free errors where messages | 17 // NSZombieEnabled which can help expose use-after-free errors where messages |
| 16 // are sent to freed Objective-C objects in production builds. | 18 // are sent to freed Objective-C objects in production builds. |
| 17 // | 19 // |
| 18 // Returns NO if it fails to enable. | 20 // Returns NO if it fails to enable. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 #import <Foundation/Foundation.h> | 39 #import <Foundation/Foundation.h> |
| 38 | 40 |
| 39 @interface NSObject (CrZombie) | 41 @interface NSObject (CrZombie) |
| 40 - (BOOL)shouldBecomeCrZombie; | 42 - (BOOL)shouldBecomeCrZombie; |
| 41 @end | 43 @end |
| 42 | 44 |
| 43 #endif // __OBJC__ | 45 #endif // __OBJC__ |
| 44 #endif // OS_MACOSX | 46 #endif // OS_MACOSX |
| 45 | 47 |
| 46 #endif // COMPONENTS_CRASH_CORE_COMMON_OBJC_ZOMBIE_H_ | 48 #endif // COMPONENTS_CRASH_CORE_COMMON_OBJC_ZOMBIE_H_ |
| OLD | NEW |