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

Issue 2425353002: Data race fix: Replace use of MessageLoop raw pointer in MSAudioProcessor. (Closed)

Created:
4 years, 2 months ago by miu
Modified:
4 years, 2 months ago
Reviewers:
perkj_chrome
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, o1ka
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Data race fix: Replace use of MessageLoop raw pointer in MSAudioProcessor. This change replaces the use of a raw pointer to the main thread's MessageLoop, by content::MediaStreamAudioProcessor, with a scoped_refptr to the main thread's task runner. This fixes a TSan-reported shutdown data race which was caused by the MessageLoop releasing its task runner at the same time the audio thread was using the MessageLoop::task_runner() accessor method. BUG=647178 Committed: https://crrev.com/a4717b9caba5b1fb1e4455af8932a3a870a9aecf Cr-Commit-Position: refs/heads/master@{#426318}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix unit tests: They all need a MessageLoop instantiated. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -24 lines) Patch
M content/renderer/media/media_stream_audio_processor.h View 3 chunks +8 lines, -6 lines 0 comments Download
M content/renderer/media/media_stream_audio_processor.cc View 11 chunks +15 lines, -12 lines 0 comments Download
M content/renderer/media/media_stream_audio_processor_unittest.cc View 1 6 chunks +5 lines, -6 lines 0 comments Download
M content/renderer/media/webrtc/processed_local_audio_source_unittest.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
miu
perkj: PTAL. https://chromiumcodereview.appspot.com/2425353002/diff/1/content/renderer/media/media_stream_audio_processor.cc File content/renderer/media/media_stream_audio_processor.cc (right): https://chromiumcodereview.appspot.com/2425353002/diff/1/content/renderer/media/media_stream_audio_processor.cc#newcode815 content/renderer/media/media_stream_audio_processor.cc:815: main_thread_runner_->PostTask( Note: This LOC is where the ...
4 years, 2 months ago (2016-10-19 02:06:40 UTC) #2
perkj_chrome
lgtm
4 years, 2 months ago (2016-10-19 03:21:29 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2425353002/1
4 years, 2 months ago (2016-10-19 03:37:33 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/317724)
4 years, 2 months ago (2016-10-19 05:28:30 UTC) #7
miu
On 2016/10/19 05:28:30, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 2 months ago (2016-10-19 21:28:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2425353002/20001
4 years, 2 months ago (2016-10-19 21:30:04 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-19 23:05:19 UTC) #12
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:12:43 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a4717b9caba5b1fb1e4455af8932a3a870a9aecf
Cr-Commit-Position: refs/heads/master@{#426318}

Powered by Google App Engine
This is Rietveld 408576698