| Index: ui/base/clipboard/clipboard_mac.mm
|
| diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm
|
| index e42a49f772df65a209df6debc9b854fb0e6bfe74..62331947ddf0d4f1118cb3c19b960faad8d3fecb 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(
|
|
|