diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 22:08:06 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 22:08:06 +0000 |
commit | e112f7c98855b381d1a163664aa1766ddc2af0d1 (patch) | |
tree | 76a4d370f9afc12f6518c65ec74790b8db93c057 /base/mac | |
parent | d3bdc82fb0bb93ee789a5d65ca92312b0d24be15 (diff) | |
download | chromium_src-e112f7c98855b381d1a163664aa1766ddc2af0d1.zip chromium_src-e112f7c98855b381d1a163664aa1766ddc2af0d1.tar.gz chromium_src-e112f7c98855b381d1a163664aa1766ddc2af0d1.tar.bz2 |
[Mac] Convert ignore-exceptions helpers to block version.
PerformSelectorIgnoringExceptions() -> RunBlockIgnoringExceptions(),
as the block version is more generalized.
BUG=none
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12342021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac')
-rw-r--r-- | base/mac/scoped_nsexception_enabler.h | 6 | ||||
-rw-r--r-- | base/mac/scoped_nsexception_enabler.mm | 11 |
2 files changed, 0 insertions, 17 deletions
diff --git a/base/mac/scoped_nsexception_enabler.h b/base/mac/scoped_nsexception_enabler.h index e28e516..484dd53 100644 --- a/base/mac/scoped_nsexception_enabler.h +++ b/base/mac/scoped_nsexception_enabler.h @@ -42,12 +42,6 @@ class BASE_EXPORT ScopedNSExceptionEnabler { BASE_EXPORT bool GetNSExceptionsAllowed(); BASE_EXPORT void SetNSExceptionsAllowed(bool allowed); -// Executes [target performSelector:sel] with fatal-exceptions turned -// off, and returns the result. If an exception is thrown during the -// perform, nil is returned. -// TODO(shess): Deprecated, convert to RunBlockIgnoringExceptions(). -BASE_EXPORT id PerformSelectorIgnoringExceptions(NSObject* target, SEL sel); - // Executes |block| with fatal-exceptions turned off, and returns the // result. If an exception is thrown during the perform, nil is // returned. diff --git a/base/mac/scoped_nsexception_enabler.mm b/base/mac/scoped_nsexception_enabler.mm index 44d4e19..7b8ad92 100644 --- a/base/mac/scoped_nsexception_enabler.mm +++ b/base/mac/scoped_nsexception_enabler.mm @@ -39,17 +39,6 @@ void SetNSExceptionsAllowed(bool allowed) { return g_exceptionsAllowed.Get().Set(allowed); } -id PerformSelectorIgnoringExceptions(NSObject* target, SEL sel) { - id ret = nil; - @try { - base::mac::ScopedNSExceptionEnabler enable; - ret = [target performSelector:sel]; - } - @catch(id exception) { - } - return ret; -} - id RunBlockIgnoringExceptions(BlockReturningId block) { id ret = nil; @try { |