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

Unified Diff: media/capture/video/mac/video_capture_device_qtkit_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: media/capture/video/mac/video_capture_device_qtkit_mac.mm
diff --git a/media/capture/video/mac/video_capture_device_qtkit_mac.mm b/media/capture/video/mac/video_capture_device_qtkit_mac.mm
index 3415e032fe10c017812751616760d4f94df0d102..2fc0b324da1e97142f1d7d77b1c75da74667fc4e 100644
--- a/media/capture/video/mac/video_capture_device_qtkit_mac.mm
+++ b/media/capture/video/mac/video_capture_device_qtkit_mac.mm
@@ -8,7 +8,6 @@
#include "base/debug/crash_logging.h"
#include "base/logging.h"
-#include "base/mac/scoped_nsexception_enabler.h"
#include "media/base/video_capture_types.h"
#include "media/capture/video/mac/video_capture_device_mac.h"
#include "media/capture/video/video_capture_device.h"
@@ -19,13 +18,14 @@
#pragma mark Class methods
+ (void)getDeviceNames:(NSMutableDictionary*)deviceNames {
- // Third-party drivers often throw exceptions, which are fatal in
- // Chromium (see comments in scoped_nsexception_enabler.h). The
- // following catches any exceptions and continues in an orderly
- // fashion with no devices detected.
- NSArray* captureDevices = base::mac::RunBlockIgnoringExceptions(^{
- return [QTCaptureDevice inputDevicesWithMediaType:QTMediaTypeVideo];
- });
+ // Third-party drivers often throw exceptions. The following catches any
+ // exceptions and continues in an orderly fashion with no devices detected.
+ NSArray* captureDevices = nil;
+ @try {
+ captureDevices =
+ [QTCaptureDevice inputDevicesWithMediaType:QTMediaTypeVideo];
+ } @catch (id exception) {
+ }
for (QTCaptureDevice* device in captureDevices) {
if ([[device attributeForKey:QTCaptureDeviceSuspendedAttribute] boolValue])

Powered by Google App Engine
This is Rietveld 408576698