diff options
author | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-01 22:26:16 +0000 |
---|---|---|
committer | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-01 22:26:16 +0000 |
commit | 06c694d0cfa60d007b8f22ccdbc69780c52b6d41 (patch) | |
tree | 16d1408712c9f4ad681fe39f829dc52202e60065 /content/renderer/renderer_main.cc | |
parent | 858a0f0a7d0d7ee4efff67e10250adb9648a8219 (diff) | |
download | chromium_src-06c694d0cfa60d007b8f22ccdbc69780c52b6d41.zip chromium_src-06c694d0cfa60d007b8f22ccdbc69780c52b6d41.tar.gz chromium_src-06c694d0cfa60d007b8f22ccdbc69780c52b6d41.tar.bz2 |
Change ChildProcess::set_main_thread registration to occur inside the RenderThreadImpl::Init method.
Background: The Init method is currently called from the RenderThreadImpl constructor. If set_main_thread is not called from Init then ContentRendererClient::RenderThreadStarted, which is also called from Init, will not be able to retrieve the current child thread using ChildThread::current. Retrieving the current child thread from inside RenderThreadStarted is necessary for performing actions that must occur before message processing starts such as adding additional MessageFilters to the child thread's channel.
BUG=112335
TEST=ChildThread::current() returns non-NULL in ContentRendererClient::RenderThreadStarted
Review URL: http://codereview.chromium.org/9297022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/renderer_main.cc')
-rw-r--r-- | content/renderer/renderer_main.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc index e4021b3..306dee9a 100644 --- a/content/renderer/renderer_main.cc +++ b/content/renderer/renderer_main.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -215,7 +215,7 @@ int RendererMain(const content::MainFunctionParams& parameters) { // TODO(markus): Check if it is OK to unconditionally move this // instruction down. RenderProcessImpl render_process; - render_process.set_main_thread(new RenderThreadImpl()); + new RenderThreadImpl(); #endif bool run_loop = true; if (!no_sandbox) { @@ -225,7 +225,7 @@ int RendererMain(const content::MainFunctionParams& parameters) { } #if defined(OS_POSIX) && !defined(OS_MACOSX) RenderProcessImpl render_process; - render_process.set_main_thread(new RenderThreadImpl()); + new RenderThreadImpl(); #endif platform.RunSandboxTests(); |