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

Unified Diff: content/browser/media/capture/content_video_capture_device_core.cc

Issue 514073002: Fix for ~ContentCaptureSubscription() after BrowserThreads are torn down. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: content/browser/media/capture/content_video_capture_device_core.cc
diff --git a/content/browser/media/capture/content_video_capture_device_core.cc b/content/browser/media/capture/content_video_capture_device_core.cc
index 2477816798ad8c553f83095a4ffac0b5a75ad525..689f3de4dc1b1047eee5c456937119f97e4b5a87 100644
--- a/content/browser/media/capture/content_video_capture_device_core.cc
+++ b/content/browser/media/capture/content_video_capture_device_core.cc
@@ -297,9 +297,13 @@ void ContentVideoCaptureDeviceCore::CaptureStarted(bool success) {
ContentVideoCaptureDeviceCore::ContentVideoCaptureDeviceCore(
scoped_ptr<VideoCaptureMachine> capture_machine)
: state_(kIdle),
- capture_machine_(capture_machine.Pass()) {}
+ capture_machine_(capture_machine.Pass()) {
+ DCHECK(capture_machine_.get());
+}
ContentVideoCaptureDeviceCore::~ContentVideoCaptureDeviceCore() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK_NE(state_, kCapturing);
// If capture_machine is not NULL, then we need to return to the UI thread to
// safely stop the capture machine.
if (capture_machine_) {

Powered by Google App Engine
This is Rietveld 408576698