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

Issue 575283004: Change WebRTCInternals::GetInstance() to use a leaky LazyInstance. (Closed)

Created:
6 years, 3 months ago by Marshall
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Change WebRTCInternals::GetInstance() to use a leaky LazyInstance. WebRTCInternals uses NotificationRegistrar which must be deleted on the UI thread. In cases where the UI thread is not the same as the main thread (like in Chromium Embedded Framework) the destruction of WebRTCInternals via AtExitManager at shutdown will cause a CalledOnValidThread() check failure. There's no particular reason why the object needs to be deleted at shutdown so just leak it instead. BUG=none TEST=none Committed: https://crrev.com/8ad274252338620049d06e533ba6a671c7847825 Cr-Commit-Position: refs/heads/master@{#295751}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Change WebRTCInternals::GetInstance to use LazyInstance. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -3 lines) Patch
M content/browser/media/webrtc_internals.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/media/webrtc_internals.cc View 1 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 16 (4 generated)
Marshall
Please review.
6 years, 3 months ago (2014-09-18 19:39:08 UTC) #2
Marshall
Please review (changing review since acolwell@ is leaving)
6 years, 3 months ago (2014-09-18 19:39:49 UTC) #4
DaleCurtis
+tommi from WebRTC who may be able to answer my thought. https://codereview.chromium.org/575283004/diff/1/content/browser/media/webrtc_internals.cc File content/browser/media/webrtc_internals.cc (right): ...
6 years, 3 months ago (2014-09-19 01:05:55 UTC) #6
tommi (sloooow) - chröme
https://codereview.chromium.org/575283004/diff/1/content/browser/media/webrtc_internals.cc File content/browser/media/webrtc_internals.cc (right): https://codereview.chromium.org/575283004/diff/1/content/browser/media/webrtc_internals.cc#newcode64 content/browser/media/webrtc_internals.cc:64: return Singleton<WebRTCInternals, On 2014/09/19 01:05:55, DaleCurtis wrote: > Hmm, ...
6 years, 3 months ago (2014-09-19 01:28:42 UTC) #7
DaleCurtis
https://codereview.chromium.org/575283004/diff/1/content/browser/media/webrtc_internals.cc File content/browser/media/webrtc_internals.cc (right): https://codereview.chromium.org/575283004/diff/1/content/browser/media/webrtc_internals.cc#newcode64 content/browser/media/webrtc_internals.cc:64: return Singleton<WebRTCInternals, On 2014/09/19 01:28:42, tommi wrote: > On ...
6 years, 3 months ago (2014-09-19 02:27:57 UTC) #8
DaleCurtis
Hmm, looking at the headers again it looks like the Singleton header isn't as explicit ...
6 years, 3 months ago (2014-09-19 17:44:39 UTC) #9
Marshall
Changed to use LazyInstance. Please review.
6 years, 3 months ago (2014-09-19 17:55:53 UTC) #10
DaleCurtis
lgtm
6 years, 3 months ago (2014-09-19 17:56:34 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/575283004/20001
6 years, 3 months ago (2014-09-19 18:05:34 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 61ef196c43771e6e06c522b0fa70ec3ff2aba201
6 years, 3 months ago (2014-09-19 18:53:08 UTC) #14
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/8ad274252338620049d06e533ba6a671c7847825 Cr-Commit-Position: refs/heads/master@{#295751}
6 years, 3 months ago (2014-09-19 18:53:42 UTC) #15
tommi (sloooow) - chröme
6 years, 3 months ago (2014-09-19 18:59:01 UTC) #16
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698