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

Side by Side Diff: chrome/browser/ui/cocoa/objc_zombie.h

Issue 7826016: [Mac] Enable CrZombie for all processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace, and verify merge. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_NSOBJECT_ZOMBIE_H_
6 #define CHROME_BROWSER_UI_COCOA_NSOBJECT_ZOMBIE_H_
7 #pragma once
8
9 #import <Foundation/Foundation.h>
10
11 // You should think twice every single time you use anything from this
12 // namespace.
13 namespace ObjcEvilDoers {
14
15 // Enable zombie object debugging. This implements a variant of Apple's
16 // NSZombieEnabled which can help expose use-after-free errors where messages
17 // are sent to freed Objective-C objects in production builds.
18 //
19 // Returns NO if it fails to enable.
20 //
21 // When |zombieAllObjects| is YES, all objects inheriting from
22 // NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie
23 // is queried to determine whether to make the object a zombie.
24 //
25 // |zombieCount| controls how many zombies to store before freeing the
26 // oldest. Set to 0 to free objects immediately after making them
27 // zombies.
28 BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount);
29
30 // Disable zombies.
31 void ZombieDisable();
32
33 } // namespace ObjcEvilDoers
34
35 @interface NSObject (CrZombie)
36 - (BOOL)shouldBecomeCrZombie;
37 @end
38
39 #endif // CHROME_BROWSER_UI_COCOA_NSOBJECT_ZOMBIE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/objc_method_swizzle_unittest.mm ('k') | chrome/browser/ui/cocoa/objc_zombie.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698