diff options
author | rsesek <rsesek@chromium.org> | 2015-07-22 09:06:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-22 16:07:00 +0000 |
commit | 787e2b2d0110448a5added6c9aae8fc7f9134144 (patch) | |
tree | 3fcf06af87cdc26c0bedce9600d532bb5246f7a1 /ui/base/clipboard/clipboard_mac.mm | |
parent | 0b866e1ba9b26a8d39247e552ab5f4d62a8e238c (diff) | |
download | chromium_src-787e2b2d0110448a5added6c9aae8fc7f9134144.zip chromium_src-787e2b2d0110448a5added6c9aae8fc7f9134144.tar.gz chromium_src-787e2b2d0110448a5added6c9aae8fc7f9134144.tar.bz2 |
Remove base/mac/scoped_nsexception_enabler.h.
Exception fatalisation is now handled via base::mac::CallWithEHFrame, so
this file is unnecessary.
The base::mac::ScopedNSExceptionEnabler is removed, since instantiating an
NSException is no longer fatal (only an uncaught one is).
base::mac::RunBlockIgnoringExceptions has been removed where possible or converted
to a @try/@catch to swallow any exceptions.
BUG=503128
R=shess@chromium.org
Review URL: https://codereview.chromium.org/1233983004
Cr-Commit-Position: refs/heads/master@{#339884}
Diffstat (limited to 'ui/base/clipboard/clipboard_mac.mm')
-rw-r--r-- | ui/base/clipboard/clipboard_mac.mm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm index e42a49f..6233194 100644 --- a/ui/base/clipboard/clipboard_mac.mm +++ b/ui/base/clipboard/clipboard_mac.mm @@ -11,7 +11,6 @@ #include "base/logging.h" #include "base/mac/mac_util.h" #include "base/mac/scoped_cftyperef.h" -#import "base/mac/scoped_nsexception_enabler.h" #include "base/mac/scoped_nsobject.h" #include "base/stl_util.h" #include "base/strings/sys_string_conversions.h" @@ -307,9 +306,12 @@ SkBitmap ClipboardMac::ReadImage(ClipboardType type) const { // If the pasteboard's image data is not to its liking, the guts of NSImage // may throw, and that exception will leak. Prevent a crash in that case; // a blank image is better. - base::scoped_nsobject<NSImage> image(base::mac::RunBlockIgnoringExceptions(^{ - return [[NSImage alloc] initWithPasteboard:GetPasteboard()]; - })); + base::scoped_nsobject<NSImage> image; + @try { + image.reset([[NSImage alloc] initWithPasteboard:GetPasteboard()]); + } @catch (id exception) { + } + SkBitmap bitmap; if (image.get()) { bitmap = gfx::NSImageToSkBitmapWithColorSpace( |