Commit 0b8372cd authored by Wei Lee's avatar Wei Lee Committed by Chromium LUCI CQ

VCD: Fix DCHECK failure when stopping streaming

Bug: b/175520499
Test: Chrome won't crash after closing page while streaming
Change-Id: I28d0c34a0ee8e0cd25fbe5c65e7c860d6f6bb00d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2589413
Auto-Submit: Wei Lee <wtlee@chromium.org>
Reviewed-by: default avatarRicky Liang <jcliang@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836925}
parent 066d5d12
...@@ -181,7 +181,7 @@ void VideoCaptureDeviceChromeOSDelegate::AllocateAndStart( ...@@ -181,7 +181,7 @@ void VideoCaptureDeviceChromeOSDelegate::AllocateAndStart(
void VideoCaptureDeviceChromeOSDelegate::StopAndDeAllocate( void VideoCaptureDeviceChromeOSDelegate::StopAndDeAllocate(
ClientType client_type) { ClientType client_type) {
DCHECK(capture_task_runner_->BelongsToCurrentThread()); DCHECK(capture_task_runner_->BelongsToCurrentThread());
DCHECK(!camera_device_delegate_); DCHECK(camera_device_delegate_);
device_context_->RemoveClient(client_type); device_context_->RemoveClient(client_type);
if (!HasDeviceClient()) { if (!HasDeviceClient()) {
CloseDevice(base::UnguessableToken()); CloseDevice(base::UnguessableToken());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment