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

Unified Diff: chrome/browser/spellchecker/spellcheck_platform_mac.mm

Issue 1233983004: Remove base/mac/scoped_nsexception_enabler.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 5 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
Index: chrome/browser/spellchecker/spellcheck_platform_mac.mm
diff --git a/chrome/browser/spellchecker/spellcheck_platform_mac.mm b/chrome/browser/spellchecker/spellcheck_platform_mac.mm
index 4e5061d2e0a99d1d0e2a69d6fb44631aa81ef490..a22f8296a1485c7e495bb4362d5a1040eab594c2 100644
--- a/chrome/browser/spellchecker/spellcheck_platform_mac.mm
+++ b/chrome/browser/spellchecker/spellcheck_platform_mac.mm
@@ -12,7 +12,6 @@
#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/mac/foundation_util.h"
-#include "base/mac/scoped_nsexception_enabler.h"
#include "base/strings/sys_string_conversions.h"
#include "base/time/time.h"
#include "chrome/common/spellcheck_common.h"
@@ -36,10 +35,11 @@ const unsigned int kShortLanguageCodeSize = 2;
// spell-checking will not work, but it also will not crash the
// browser.
NSSpellChecker* SharedSpellChecker() {
- return base::mac::ObjCCastStrict<NSSpellChecker>(
- base::mac::RunBlockIgnoringExceptions(^{
- return [NSSpellChecker sharedSpellChecker];
- }));
+ @try {
+ return [NSSpellChecker sharedSpellChecker];
+ } @catch (id exception) {
+ return nil;
+ }
}
// A private utility function to convert hunspell language codes to OS X

Powered by Google App Engine
This is Rietveld 408576698