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

Issue 899943004: Fix race when setting Desktop window id. (Closed)

Created:
5 years, 10 months ago by perkj_chrome
Modified:
5 years, 10 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This fix a potential race when setting the window id. It also add a check to verify that a media::VideoCaptureDevice is not deleted on the wrong thread. BUG=450382 Committed: https://crrev.com/0c9bb6edbc97d5ff103f544b2bc02ab4c569c5a2 Cr-Commit-Position: refs/heads/master@{#315381}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix race when setting the notification window. #

Total comments: 6

Patch Set 3 : Addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -35 lines) Patch
M content/browser/renderer_host/media/video_capture_manager.h View 1 2 chunks +2 lines, -5 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 7 chunks +34 lines, -30 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
perkj_chrome
Hej I have not been able to repro a crash with this CHECK but I ...
5 years, 10 months ago (2015-02-05 17:36:17 UTC) #2
Sergey Ulanov
https://codereview.chromium.org/899943004/diff/1/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/899943004/diff/1/content/browser/renderer_host/media/video_capture_manager.cc#newcode285 content/browser/renderer_host/media/video_capture_manager.cc:285: CHECK(entry->video_capture_device() == NULL); I think it's better to add ...
5 years, 10 months ago (2015-02-05 18:52:06 UTC) #3
perkj_chrome
Hi, got spotting of the race when setting the window id. How about this? https://codereview.chromium.org/899943004/diff/1/content/browser/renderer_host/media/video_capture_manager.cc ...
5 years, 10 months ago (2015-02-06 13:04:26 UTC) #4
perkj_chrome
On 2015/02/06 13:04:26, perkj wrote: > Hi, got spotting of the race when setting the ...
5 years, 10 months ago (2015-02-06 13:30:42 UTC) #5
miu
Be careful if you plan on committing this change with CHECKs in the destructors. A ...
5 years, 10 months ago (2015-02-06 21:49:21 UTC) #6
miu
Oh, maybe never mind my last comment. I see now nothing here is running on ...
5 years, 10 months ago (2015-02-06 21:51:47 UTC) #7
Sergey Ulanov
https://codereview.chromium.org/899943004/diff/20001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/899943004/diff/20001/content/browser/renderer_host/media/video_capture_manager.cc#newcode118 content/browser/renderer_host/media/video_capture_manager.cc:118: CHECK(video_capture_device_ == NULL); s/NULL/nullptr/, or CHECK(!video_capture_device_) https://codereview.chromium.org/899943004/diff/20001/content/browser/renderer_host/media/video_capture_manager.cc#newcode666 content/browser/renderer_host/media/video_capture_manager.cc:666: notification_window_ids_[session_id])); ...
5 years, 10 months ago (2015-02-06 22:20:03 UTC) #8
perkj_chrome
PTAL https://codereview.chromium.org/899943004/diff/20001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/899943004/diff/20001/content/browser/renderer_host/media/video_capture_manager.cc#newcode116 content/browser/renderer_host/media/video_capture_manager.cc:116: // CHECK that the media::VideoCaptureDevice is not On ...
5 years, 10 months ago (2015-02-09 08:27:41 UTC) #9
Sergey Ulanov
lgtm
5 years, 10 months ago (2015-02-09 19:20:08 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/899943004/40001
5 years, 10 months ago (2015-02-09 19:37:33 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 10 months ago (2015-02-09 20:44:17 UTC) #13
commit-bot: I haz the power
5 years, 10 months ago (2015-02-09 20:45:06 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0c9bb6edbc97d5ff103f544b2bc02ab4c569c5a2
Cr-Commit-Position: refs/heads/master@{#315381}

Powered by Google App Engine
This is Rietveld 408576698