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

Issue 15732021: swap the renderer_ reference to local before calling Stop() (Closed)

Created:
7 years, 7 months ago by no longer working on chromium
Modified:
7 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

swap the renderer_ reference to local before calling Stop(), otherwise we will invalidate the pointer during the Stop() call. The problem that this CL is trying to fix: In WebRtcAudioDeviceImpl::Terminate(), when the renderer_ is valid and we call renderer_->Stop(), this Stop() function will trigger a callback till WebRtcAudioDeviceImpl::RemoveAudioRenderer() where we set the renderer_ to NULL. This will crash chrome since renderer_ is being used at the same time. BUG=241430 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202420

Patch Set 1 : #

Total comments: 4

Patch Set 2 : addressed Tommi's comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M content/renderer/media/webrtc_audio_device_impl.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
no longer working on chromium
7 years, 7 months ago (2013-05-27 09:49:57 UTC) #1
henrika (OOO until Aug 14)
https://codereview.chromium.org/15732021/diff/2001/content/renderer/media/webrtc_audio_device_impl.cc File content/renderer/media/webrtc_audio_device_impl.cc (right): https://codereview.chromium.org/15732021/diff/2001/content/renderer/media/webrtc_audio_device_impl.cc#newcode262 content/renderer/media/webrtc_audio_device_impl.cc:262: // WebRtcAudioRenderer::Stop() will trigger RemoveAudioRenderer(), so we I am ...
7 years, 7 months ago (2013-05-27 10:06:00 UTC) #2
henrika (OOO until Aug 14)
https://codereview.chromium.org/15732021/diff/2001/content/renderer/media/webrtc_audio_device_impl.cc File content/renderer/media/webrtc_audio_device_impl.cc (right): https://codereview.chromium.org/15732021/diff/2001/content/renderer/media/webrtc_audio_device_impl.cc#newcode262 content/renderer/media/webrtc_audio_device_impl.cc:262: // WebRtcAudioRenderer::Stop() will trigger RemoveAudioRenderer(), so we OK, checking ...
7 years, 7 months ago (2013-05-27 10:11:21 UTC) #3
henrika (OOO until Aug 14)
OK, see the bug now but any idea why we see this now?
7 years, 7 months ago (2013-05-27 10:14:45 UTC) #4
henrika (OOO until Aug 14)
LGTM if you improve the comment in the code explaining why you have to do ...
7 years, 7 months ago (2013-05-27 10:29:47 UTC) #5
no longer working on chromium
+ Tommi since Henrik is chatting with him about it. Tommi, could you please take ...
7 years, 7 months ago (2013-05-27 10:34:38 UTC) #6
henrika (OOO until Aug 14)
I meant, please check with Tommi just in case. On Mon, May 27, 2013 at ...
7 years, 7 months ago (2013-05-27 10:36:18 UTC) #7
tommi (sloooow) - chröme
https://codereview.chromium.org/15732021/diff/2001/content/renderer/media/webrtc_audio_device_impl.cc File content/renderer/media/webrtc_audio_device_impl.cc (right): https://codereview.chromium.org/15732021/diff/2001/content/renderer/media/webrtc_audio_device_impl.cc#newcode265 content/renderer/media/webrtc_audio_device_impl.cc:265: renderer_.swap(renderer); I don't think swap() is the right thing ...
7 years, 7 months ago (2013-05-27 10:48:13 UTC) #8
no longer working on chromium
Good catch, I missed the DCHECK in the RemoveAudioRenderer(). Tommi, ptal. Thanks, SX https://codereview.chromium.org/15732021/diff/2001/content/renderer/media/webrtc_audio_device_impl.cc File ...
7 years, 7 months ago (2013-05-27 11:15:41 UTC) #9
tommi (sloooow) - chröme
lgtm
7 years, 7 months ago (2013-05-27 11:22:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/15732021/10001
7 years, 7 months ago (2013-05-27 11:23:40 UTC) #11
commit-bot: I haz the power
7 years, 7 months ago (2013-05-27 14:02:08 UTC) #12
Message was sent while issue was closed.
Change committed as 202420

Powered by Google App Engine
This is Rietveld 408576698