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

Side by Side Diff: chrome/browser/mac/exception_processor.h

Issue 2543813003: [Mac] Modify the ObjC exception preprocessor to make some exceptions fatal. (Closed)
Patch Set: Created 4 years 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
OLDNEW
(Empty)
1 // Copyright 2016 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_MAC_EXCEPTION_PROCESSOR_H_
6 #define CHROME_BROWSER_MAC_EXCEPTION_PROCESSOR_H_
7
8 #include <stddef.h>
9
10 @class NSException;
11
12 namespace chrome {
13
14 // Installs the Objective-C exception preprocessor. This records UMA and crash
15 // keys for NSException objects. The preprocessor will also make fatal any
16 // exception that is not handled.
17 void InstallObjcExceptionPreprocessor();
18
19 // The items below are exposed only for testing.
20 ////////////////////////////////////////////////////////////////////////////////
21
22 // Removes the exception preprocessor if it is installed.
23 void UninstallObjcExceptionPreprocessor();
24
25
Mark Mentovai 2016/12/01 19:02:32 Extra blank line?
Robert Sesek 2016/12/06 23:18:09 Done.
26 // Bin for unknown exceptions. Exposed for testing purposes.
Mark Mentovai 2016/12/01 19:02:32 “Exposed for testing purposes” on all of these isn
Robert Sesek 2016/12/06 23:18:09 Done.
27 extern const size_t kUnknownNSException;
Mark Mentovai 2016/12/01 19:02:32 Can be constexpr and get its value right here?
Robert Sesek 2016/12/06 23:18:09 Its value is kKnownNSExceptionCount, which isn't p
28
29 // Returns the histogram bin for |exception| if it is one we track
30 // specifically, or |kUnknownNSException| if unknown. Exposed for testing
31 // purposes.
32 size_t BinForException(NSException* exception);
33
34 // Use UMA to track exception occurance. Exposed for testing purposes.
35 void RecordExceptionWithUma(NSException* exception);
36
37 } // namespace chrome
38
39 #endif // CHROME_BROWSER_MAC_EXCEPTION_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698