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

Issue 10291011: Remove BrowserThread-specific implementation of MessageLoopProxy. (Closed)

Created:
8 years, 7 months ago by Sergey Ulanov
Modified:
8 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Remove BrowserThread-specific implementation of MessageLoopProxy. The plan is to merge MessageLoopProxy with MessageLoopProxyImpl. We don't need BrowserThreadMessageLoopProxy because all MessageLoop instances have proxy anyway.

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -52 lines) Patch
M content/browser/browser_thread_impl.cc View 1 2 3 2 chunks +24 lines, -50 lines 0 comments Download
M content/public/browser/browser_thread.h View 1 2 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Sergey Ulanov
8 years, 7 months ago (2012-05-02 00:57:10 UTC) #1
jam
lgtm
8 years, 7 months ago (2012-05-02 14:49:13 UTC) #2
Sergey Ulanov
John, thanks for review, With this change chrome now DCHECKs with the following callstack when ...
8 years, 7 months ago (2012-05-02 18:16:23 UTC) #3
Sergey Ulanov
Looks like the problem below can be fixed by switching JsonPrefStore to worker pool - ...
8 years, 7 months ago (2012-05-02 21:27:04 UTC) #4
jam
8 years, 7 months ago (2012-05-06 06:51:10 UTC) #5
On 2012/05/02 21:27:04, sergeyu wrote:
> Looks like the problem below can be fixed by switching JsonPrefStore to worker
> pool - http://codereview.chromium.org/10344007/ .
> There was another problem on shutdown - DeleteSoon() wasn't working properly
> when called after threads are destroyed. Fixed it in patch set 3.

It would be preferable to use a mechanism to automatically release the lock,
instead of having to remember to do so at each early return. You can use
AutoLock in a scoped_ptr.

> 
> On 2012/05/02 18:16:23, sergeyu wrote:
> > John, thanks for review,
> > With this change chrome now DCHECKs with the following callstack when
started:
> > [25753:25753:1138772815284:FATAL:browser_thread_impl.cc(358)] Check failed:
> > thread. 
> > Backtrace:
> > 	base::debug::StackTrace::StackTrace() [0x7f5f16a2df5e]
> > 	logging::LogMessage::~LogMessage() [0x7f5f16a65bd2]
> > 	content::BrowserThread::GetMessageLoopProxyForThread() [0x7f5f18be842c]
> > 	PrefService::CreatePrefService() [0x7f5f1af40ee0]
> > 	BrowserProcessImpl::CreateLocalState() [0x7f5f1bb3ffa8]
> > 	BrowserProcessImpl::local_state() [0x7f5f1bb3fe56]
> > 	(anonymous namespace)::InitializeLocalState() [0x7f5f1b955718]
> > 	ChromeBrowserMainParts::PreCreateThreadsImpl() [0x7f5f1b954a8c]
> > 	ChromeBrowserMainParts::PreCreateThreads() [0x7f5f1b95439f]
> > 	content::BrowserMainLoop::CreateThreads() [0x7f5f18bde853]
> > 	(anonymous namespace)::BrowserMainRunnerImpl::Initialize() [0x7f5f18be1c9e]
> > 	BrowserMain() [0x7f5f18bdd6fa]
> > 	(anonymous namespace)::RunNamedProcessTypeMain() [0x7f5f18bb560a]
> > 	(anonymous namespace)::ContentMainRunnerImpl::Run() [0x7f5f18bb52cd]
> > 	content::ContentMain() [0x7f5f18bb4844]
> > 
> > I.e. it looks like we are trying to initialize JsonPrefStore with the file
> > thread before that thread is started. What do you think would be the right
fix
> > for this issue? Why do we need to initialize local state before browser
> threads
> > are started?

Powered by Google App Engine
This is Rietveld 408576698