New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 785991 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WebRTC logging bounces between threads

Project Member Reported by thestig@chromium.org, Nov 16 2017

Issue description

This is a simplified summary of what's happening. The clear logging process behaves similarly.

UI: WebrtcLoggingPrivateStartFunction::RunAsync() PostTask() to:
IO WebRtcLoggingHandlerHost::StartLogging(), which eventually leads to:
IO: WebRtcTextLogHandler::LogInitialInfoOnIOThread() PostTask() to:
UI: WebRtcTextLogHandler::EnableBrowserProcessLoggingOnUIThread() which calls:
UI: RenderProcessHostImpl::SetWebRtcLogMessageCallback() which calls:
UI: MediaStreamManager::RegisterNativeLogCallback() which calls:
IO: MediaStreamManager::DoNativeLogCallbackRegistration().

This can probably be changed to start on the UI thread as before, switch to IO thread, and stay on the IO thread all the way down to the end. See https://chromium-review.googlesource.com/c/chromium/src/+/774360
 
Owner: thestig@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f25c4928e332bf161a0407691caa713a80cf0265

commit f25c4928e332bf161a0407691caa713a80cf0265
Author: Lei Zhang <thestig@chromium.org>
Date: Tue Nov 28 08:34:15 2017

WebRTC: Simplify logging to bounce less between threads.

Instead of bouncing between UI/IO/UI/IO, just go from UI to IO.

BUG= 785991 

Change-Id: I42f014918350a6aac3c96574b5cd12c77ca59be8
Reviewed-on: https://chromium-review.googlesource.com/774360
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tommi <tommi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519610}
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/chrome/browser/media/webrtc/webrtc_logging_handler_host.h
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/chrome/browser/media/webrtc/webrtc_text_log_handler.cc
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/chrome/browser/media/webrtc/webrtc_text_log_handler.h
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/browser/renderer_host/media/media_stream_manager.h
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/browser/renderer_host/render_process_host_impl.h
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/public/browser/BUILD.gn
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/public/browser/render_process_host.h
[add] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/public/browser/webrtc_log.cc
[add] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/public/browser/webrtc_log.h
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/public/test/mock_render_process_host.cc
[modify] https://crrev.com/f25c4928e332bf161a0407691caa713a80cf0265/content/public/test/mock_render_process_host.h

Status: Fixed (was: Started)

Sign in to add a comment