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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 899943004: Fix race when setting Desktop window id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 26b3a701105330ccc00046b00f6848a880ba5e8e..ab9f25cd4b68f827885f7d3f0095632e62a50577 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -280,6 +280,9 @@ void VideoCaptureManager::DoStopDevice(DeviceEntry* entry) {
request != device_start_queue_.rend(); ++request) {
if (request->serial_id() == entry->serial_id) {
request->set_abort_start();
+ // This is a CHECK to make sure the media::VideoCaptureDevice is not
+ // deleted on the wrong thread if |entry| is deleted.
+ CHECK(entry->video_capture_device() == NULL);
Sergey Ulanov 2015/02/05 18:52:06 I think it's better to add a CHECK in ~DesktopCapt
perkj_chrome 2015/02/06 13:04:26 How about in ~DeviceEntry to catch all types of ca
DVLOG(3) << "DoStopDevice, aborting start request for device "
<< entry->id << " serial_id = " << entry->serial_id;
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698