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

Issue 22339024: Crash fix: Remove MessageLoop from AudioPowerMonitor and instead use MessageLoopProxy in AudioOutpu… (Closed)

Created:
7 years, 4 months ago by miu
Modified:
7 years, 4 months ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

Crash fix: Remove MessageLoop from AudioPowerMonitor and instead use MessageLoopProxy in AudioOutputController. Root cause: AudioPowerMonitor held a reference to the audio thread's MessageLoop and erroneously assumed it would be valid until after the audio stream is closed. However, at browser shutdown, it's possible for audio streams to be closed by the correct thread, but *after* the MessageLoop associated with the thread is destroyed. BUG=268629 TEST=media_unittests and manual confirmation by running a browser with the --enable-audible-notifications command-line flag. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217142

Patch Set 1 #

Total comments: 11

Patch Set 2 : Addressed Dale's review comments. #

Total comments: 6

Patch Set 3 : boolean style #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -140 lines) Patch
M media/audio/audio_output_controller.h View 4 chunks +9 lines, -12 lines 0 comments Download
M media/audio/audio_output_controller.cc View 1 6 chunks +23 lines, -19 lines 0 comments Download
M media/audio/audio_power_monitor.h View 1 2 4 chunks +22 lines, -31 lines 0 comments Download
M media/audio/audio_power_monitor.cc View 1 2 3 chunks +37 lines, -51 lines 0 comments Download
M media/audio/audio_power_monitor_unittest.cc View 1 2 5 chunks +12 lines, -27 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
miu
Please review. This should fix the crashing on all platforms. No more assumptions about when ...
7 years, 4 months ago (2013-08-12 06:33:11 UTC) #1
DaleCurtis
Much clearer, but naughty use of races :) https://codereview.chromium.org/22339024/diff/1/media/audio/audio_power_monitor.cc File media/audio/audio_power_monitor.cc (right): https://codereview.chromium.org/22339024/diff/1/media/audio/audio_power_monitor.cc#newcode22 media/audio/audio_power_monitor.cc:22: ANNOTATE_BENIGN_RACE( ...
7 years, 4 months ago (2013-08-12 18:23:29 UTC) #2
miu
Thanks, Dale. Took all of your suggestions. I like the try-locking better. Guess I was ...
7 years, 4 months ago (2013-08-12 19:41:45 UTC) #3
DaleCurtis
lgtm, you probably will need to release-block-beta that bug so you can get this merged ...
7 years, 4 months ago (2013-08-12 20:43:56 UTC) #4
miu
Thanks for the quick turnaround, Dale. https://codereview.chromium.org/22339024/diff/18001/media/audio/audio_power_monitor.cc File media/audio/audio_power_monitor.cc (right): https://codereview.chromium.org/22339024/diff/18001/media/audio/audio_power_monitor.cc#newcode28 media/audio/audio_power_monitor.cc:28: power_reading_ = average_power_ ...
7 years, 4 months ago (2013-08-12 21:10:54 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/22339024/23001
7 years, 4 months ago (2013-08-12 21:14:52 UTC) #6
commit-bot: I haz the power
7 years, 4 months ago (2013-08-13 00:50:17 UTC) #7
Message was sent while issue was closed.
Change committed as 217142

Powered by Google App Engine
This is Rietveld 408576698