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

Issue 956263003: Remove CHECK(!g_webrtc_logging_delegate) for --single-process model

Created:
5 years, 9 months ago by jinlong.zhai
Modified:
5 years, 9 months ago
CC:
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

Remove CHECK(!g_webrtc_logging_delegate) for --single-process model --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. So we may not do CHECK(!g_webrtc_logging_delegate) or it will fail under --single-process model. BUG=455573

Patch Set 1 #

Patch Set 2 : #

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

Messages

Total messages: 9 (3 generated)
jinlong.zhai
hi, tommi: Since we can not change from process-level to RenderThread-level (patchset #1 id:1 of ...
5 years, 9 months ago (2015-02-26 08:38:25 UTC) #2
jinlong.zhai
5 years, 9 months ago (2015-02-28 02:06:03 UTC) #4
tommi (sloooow) - chröme
On 2015/02/28 at 02:06:03, jinlong.zhai wrote: > Sorry, I don't like this. We can't remove ...
5 years, 9 months ago (2015-02-28 17:25:52 UTC) #5
jinlong.zhai
hi,tommi I have an another proper fix for single process mode, please to have another ...
5 years, 9 months ago (2015-03-04 07:43:35 UTC) #7
tommi (sloooow) - chröme
https://codereview.chromium.org/956263003/diff/20001/content/renderer/media/webrtc_logging.cc File content/renderer/media/webrtc_logging.cc (right): https://codereview.chromium.org/956263003/diff/20001/content/renderer/media/webrtc_logging.cc#newcode25 content/renderer/media/webrtc_logging.cc:25: !g_webrtc_logging_delegate); In the case where g_webrtc_logging_delegate is not null, ...
5 years, 9 months ago (2015-03-04 13:23:20 UTC) #8
jinlong.zhai
5 years, 9 months ago (2015-03-05 01:50:17 UTC) #9
https://codereview.chromium.org/956263003/diff/20001/content/renderer/media/w...
File content/renderer/media/webrtc_logging.cc (right):

https://codereview.chromium.org/956263003/diff/20001/content/renderer/media/w...
content/renderer/media/webrtc_logging.cc:25: !g_webrtc_logging_delegate);
On 2015/03/04 13:23:20, tommi wrote:
> In the case where g_webrtc_logging_delegate is not null, what value will this
be
> set to?  Will it overwrite the previous value or will it be assigned the same
> value it is already set to?

In this case, it will overwrite the provious value. And I think this feature is
just to notify logging message, it is OK to do this no matter by new value or
previous value in single process.

I also consider another way to re-landing this: create g_webrtc_logging_delegate
as a tls on IO thread, and also we must make sure every place where
WebRtcLogMessage be called should do on IO thread or it will not work by add
CHECK(g_webrtc_logging_delegate_tls->poniter()->Get()) << "WebRtcLogMessage
should be called on IO thread".

WDYT?

Powered by Google App Engine
This is Rietveld 408576698