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

Side by Side Diff: base/mac/scoped_nsexception_enabler.h

Issue 8883040: [Mac] Ignore spell-checker exceptions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/Calls/Executes/. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/mac/scoped_nsexception_enabler.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 BASE_MAC_SCOPED_NSEXCEPTION_ENABLER_H_ 5 #ifndef BASE_MAC_SCOPED_NSEXCEPTION_ENABLER_H_
6 #define BASE_MAC_SCOPED_NSEXCEPTION_ENABLER_H_ 6 #define BASE_MAC_SCOPED_NSEXCEPTION_ENABLER_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Foundation/Foundation.h>
10
9 #include "base/base_export.h" 11 #include "base/base_export.h"
10 #include "base/basictypes.h" 12 #include "base/basictypes.h"
11 13
12 namespace base { 14 namespace base {
13 namespace mac { 15 namespace mac {
14 16
15 // BrowserCrApplication attempts to restrict throwing of NSExceptions 17 // BrowserCrApplication attempts to restrict throwing of NSExceptions
16 // because they interact badly with C++ scoping rules. Unfortunately, 18 // because they interact badly with C++ scoping rules. Unfortunately,
17 // there are some cases where exceptions must be supported, such as 19 // there are some cases where exceptions must be supported, such as
18 // when third-party printer drivers are used. These helpers can be 20 // when third-party printer drivers are used. These helpers can be
(...skipping 15 matching lines...) Expand all
34 36
35 DISALLOW_COPY_AND_ASSIGN(ScopedNSExceptionEnabler); 37 DISALLOW_COPY_AND_ASSIGN(ScopedNSExceptionEnabler);
36 }; 38 };
37 39
38 // Access the exception setting for the current thread. This is for 40 // Access the exception setting for the current thread. This is for
39 // the support code in BrowserCrApplication, other code should use 41 // the support code in BrowserCrApplication, other code should use
40 // the scoper. 42 // the scoper.
41 BASE_EXPORT bool GetNSExceptionsAllowed(); 43 BASE_EXPORT bool GetNSExceptionsAllowed();
42 BASE_EXPORT void SetNSExceptionsAllowed(bool allowed); 44 BASE_EXPORT void SetNSExceptionsAllowed(bool allowed);
43 45
46 // Executes [target performSelector:sel] with fatal-exceptions turned
47 // off, and returns the result. If an exception is thrown during the
48 // perform, nil is returned.
49 BASE_EXPORT id PerformSelectorIgnoringExceptions(NSObject* target, SEL sel);
50
44 } // namespace mac 51 } // namespace mac
45 } // namespace base 52 } // namespace base
46 53
47 #endif // BASE_MAC_SCOPED_NSEXCEPTION_ENABLER_H_ 54 #endif // BASE_MAC_SCOPED_NSEXCEPTION_ENABLER_H_
OLDNEW
« no previous file with comments | « no previous file | base/mac/scoped_nsexception_enabler.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698