summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/browser/renderer_host/media/video_capture_controller.cc9
-rw-r--r--tools/valgrind/tsan/suppressions.txt5
2 files changed, 5 insertions, 9 deletions
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index e1d5d28..bdad7e0 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -59,9 +59,10 @@ void VideoCaptureController::ReturnBuffer(int buffer_id) {
{
base::AutoLock lock(lock_);
free_dibs_.push_back(buffer_id);
- ready_to_delete = (free_dibs_.size() == owned_dibs_.size());
+ ready_to_delete = (free_dibs_.size() == owned_dibs_.size()) &&
+ report_ready_to_delete_;
}
- if (report_ready_to_delete_ && ready_to_delete) {
+ if (ready_to_delete) {
event_handler_->OnReadyToDelete(id_);
}
}
@@ -198,10 +199,10 @@ void VideoCaptureController::OnFrameInfo(
void VideoCaptureController::OnDeviceStopped(Task* stopped_task) {
bool ready_to_delete_now;
- // Set flag to indicate we need to report when all DIBs have been returned.
- report_ready_to_delete_ = true;
{
base::AutoLock lock(lock_);
+ // Set flag to indicate we need to report when all DIBs have been returned.
+ report_ready_to_delete_ = true;
ready_to_delete_now = (free_dibs_.size() == owned_dibs_.size());
}
diff --git a/tools/valgrind/tsan/suppressions.txt b/tools/valgrind/tsan/suppressions.txt
index d54959e..5e5f693 100644
--- a/tools/valgrind/tsan/suppressions.txt
+++ b/tools/valgrind/tsan/suppressions.txt
@@ -497,11 +497,6 @@
fun:JSC::Yarr::Interpreter::interpret*
fun:JSC::Yarr::interpret*
}
-{
- bug_86507
- ThreadSanitizer:Race
- fun:VideoCaptureController::OnDeviceStopped
-}
{
bug_86916