summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortommi <tommi@chromium.org>2015-05-05 03:21:01 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-05 10:21:52 +0000
commit3c5c56260910abc517d5b436d0c6caf6d84ceb4d (patch)
tree141dab6bfcec7ab818f4595124e62d6ea50bb475
parentdbec99862060770f9ab6d17c418e64048f139234 (diff)
downloadchromium_src-3c5c56260910abc517d5b436d0c6caf6d84ceb4d.zip
chromium_src-3c5c56260910abc517d5b436d0c6caf6d84ceb4d.tar.gz
chromium_src-3c5c56260910abc517d5b436d0c6caf6d84ceb4d.tar.bz2
Add a check to IsAVFoundationSupportedHelper to catch race.
I suspect we might be running into a race there now in some cases where QTKit is all of a sudden being used when we should clearly be using AVFoundation. R=magjed@chromium.org BUG= Review URL: https://codereview.chromium.org/1054253002 Cr-Commit-Position: refs/heads/master@{#328307}
-rw-r--r--media/base/mac/avfoundation_glue.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/media/base/mac/avfoundation_glue.mm b/media/base/mac/avfoundation_glue.mm
index 0c48e4b..4518fef 100644
--- a/media/base/mac/avfoundation_glue.mm
+++ b/media/base/mac/avfoundation_glue.mm
@@ -120,6 +120,8 @@ class AVFoundationInternal {
// This contains the logic of checking whether AVFoundation is supported.
// It's called only once and the results are cached in a static bool.
bool IsAVFoundationSupportedHelper() {
+ CHECK([NSThread isMainThread]);
+
// AVFoundation is only available on OS Lion and above.
if (!base::mac::IsOSLionOrLater()) {
LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_OS_PREVIOUS_TO_LION);