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

Issue 889313003: Change g_webrtc_logging_delegate from process-level to RenderThread-level (Closed)

Created:
5 years, 10 months ago by jinlong.zhai
Modified:
5 years, 9 months ago
CC:
dcheng, brettw, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change g_webrtc_logging_delegate from process-level to RenderThread-level --single-process mode may happen crash in file of webrtc_logging.cc where code is CHECK(!g_webrtc_logging_delegate). The orginal code is to expect there to be only one g_webrtc_logging_delegate instance in a single render process. g_webrtc_logging_delegate is created when a RenderThreadImpl is created. But in --single-process model all RenderThreadImpl are created in browser process and so g_webrtc_logging_delegate may be created many times in a single process. Then CHECK(!g_webrtc_logging_delegate) will fail. In this patch will change g_webrtc_logging_delegate from process-level to RenderThread-Level. Since every render process will only keep one RenderThread. BUG=455573 Committed: https://crrev.com/1fb332dc1f81bb05716342704b7f969af6921f3e Cr-Commit-Position: refs/heads/master@{#315131}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -6 lines) Patch
M AUTHORS View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/webrtc_logging.cc View 2 chunks +9 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
jinlong.zhai
Please help to review the patch.
5 years, 10 months ago (2015-02-06 02:40:35 UTC) #2
dcheng
-brettw, -dcheng as reviewers. I'd recommend picking just the reviewers you need (which in this ...
5 years, 10 months ago (2015-02-06 20:10:25 UTC) #4
dcheng
5 years, 10 months ago (2015-02-06 20:10:36 UTC) #5
tommi (sloooow) - chröme
lgtm
5 years, 10 months ago (2015-02-06 22:20:21 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/889313003/1
5 years, 10 months ago (2015-02-06 22:20:39 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 10 months ago (2015-02-06 23:20:14 UTC) #10
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/1fb332dc1f81bb05716342704b7f969af6921f3e Cr-Commit-Position: refs/heads/master@{#315131}
5 years, 10 months ago (2015-02-06 23:21:31 UTC) #11
tommi (sloooow) - chröme
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/931693002/ by tommi@chromium.org. ...
5 years, 10 months ago (2015-02-16 21:12:42 UTC) #12
pbos
On 2015/02/16 21:12:42, tommi wrote: > A revert of this CL (patchset #1 id:1) has ...
5 years, 10 months ago (2015-02-16 22:01:27 UTC) #13
jinlong.zhai
5 years, 9 months ago (2015-02-27 06:45:38 UTC) #14
Message was sent while issue was closed.
On 2015/02/16 22:01:27, pbos wrote:
> On 2015/02/16 21:12:42, tommi wrote:
> > A revert of this CL (patchset #1 id:1) has been created in
> > https://codereview.chromium.org/931693002/ by mailto:tommi@chromium.org.
> > 
> > The reason for reverting is: This breaks webrtc logging.  It changes a
global
> > pointer to be a tls pointer, which doesn't work..
> 
> An idea for re-landing this: Shouldn't we be able to have a ref-counted global
> instance instead, or does the logging delegate require internal locking that's
> not present if the instance is to be shared?
> 
> This is just drive-by I'm not very familiar with global lazy initialization in
> Chromium. :)

I think the orginal logic is to expect there to be single instance for one
render process,
but it is not suitable for --single-process and also logging delegate can not to
be as
a RenderThread-level instance. I think the code is right execpt for
CHECK(!g_webrtc_logging_delegate).

So I suggest we just remove CHECK(!g_webrtc_logging_delegate).
in_reply_to: 5738600293466112
send_mail: 1
subject: Change g_webrtc_logging_delegate from process-level to
RenderThread-level

Powered by Google App Engine
This is Rietveld 408576698