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

Issue 887638 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Oct 5
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 729596



Sign in to add a comment

Move |media_thread| from CastBrowserMainParts to CastContentBrowserClient.

Project Member Reported by hanxi@chromium.org, Sep 20

Issue description

CastContentBrowserClient::RegisterInProcessServices(https://cs.chromium.org/chromium/src/chromecast/browser/cast_content_browser_client.cc?rcl=f36265bb589b3cecd51eb22d8e510ba4a7ba7fe7&l=679) is called when ServiceManagerContext is created (https://cs.chromium.org/chromium/src/content/browser/service_manager/service_manager_context.cc?rcl=a6767cf718daf025bd866d6c80a7583edb6b7cdd&l=602). The GetMediaTaskRunner() accesses the TaskRunner of a media thread created by CastBrowserMainParts. However, we plan to create the ServiceManagerContext in ContentMainRunnerImpl, and none of the BrowserParts are created. One solution is to let the CastContentBrowserClient owns the media thread, and creates it upon demand.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 5

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

commit 362d7c2729d0526102e5faf715091ac887b22746
Author: Xi Han <hanxi@google.com>
Date: Fri Oct 05 19:27:58 2018

Move |media_thread| from CastBrowserMainParts to CastContentBrowserClient.

In the new startup code, ServiceManagerContext (SMC) will be created before
the BrowserMainRunner is created. In the constructor of SMC, the
GetMediaTaskRunner() accesses the TaskRunner of a media thread created by
CastBrowserMainParts which will be created after the BrowserMainRunner. So
we make the CastContentBrowserClient own the media thread and create it upon
request.

Bug:  887638 
Change-Id: I8986f5b00600760afc8bf00bac140f459c7145d1
Reviewed-on: https://chromium-review.googlesource.com/c/1258204
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Kenneth MacKay <kmackay@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597239}
[modify] https://crrev.com/362d7c2729d0526102e5faf715091ac887b22746/chromecast/browser/cast_browser_main_parts.cc
[modify] https://crrev.com/362d7c2729d0526102e5faf715091ac887b22746/chromecast/browser/cast_browser_main_parts.h
[modify] https://crrev.com/362d7c2729d0526102e5faf715091ac887b22746/chromecast/browser/cast_browser_main_parts_simple.cc
[modify] https://crrev.com/362d7c2729d0526102e5faf715091ac887b22746/chromecast/browser/cast_content_browser_client.cc
[modify] https://crrev.com/362d7c2729d0526102e5faf715091ac887b22746/chromecast/browser/cast_content_browser_client.h

Status: Fixed (was: Available)

Sign in to add a comment