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

Unified Diff: chrome/browser/cocoa/nsimage_cache.mm

Issue 165330: Disable RTTI and C++ exceptions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/nsimage_cache.h ('k') | chrome/browser/profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/nsimage_cache.mm
===================================================================
--- chrome/browser/cocoa/nsimage_cache.mm (revision 23061)
+++ chrome/browser/cocoa/nsimage_cache.mm (working copy)
@@ -7,6 +7,15 @@
#include "base/logging.h"
#include "base/mac_util.h"
+// When C++ exceptions are disabled, the C++ library defines |try| and
+// |catch| so as to allow exception-expecting C++ code to build properly when
+// language support for exceptions is not present. These macros interfere
+// with the use of |@try| and |@catch| in Objective-C files such as this one.
+// Undefine these macros here, after everything has been #included, since
+// there will be no C++ uses and only Objective-C uses from this point on.
+#undef try
+#undef catch
+
namespace nsimage_cache {
static NSMutableDictionary *image_cache = nil;
@@ -53,4 +62,4 @@
[image_cache removeAllObjects];
}
-} // nsimage_cache
+} // namespace nsimage_cache
« no previous file with comments | « chrome/browser/cocoa/nsimage_cache.h ('k') | chrome/browser/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698