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

Unified Diff: content/browser/browser_thread_impl.cc

Issue 18618004: Change BrowserThreadDelegate to run Init() async. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_thread_impl.cc
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc
index 422011422afa8f8bea82b63d680299980142ae86..abd498003d540e47d602cba8171a8774672ae483 100644
--- a/content/browser/browser_thread_impl.cc
+++ b/content/browser/browser_thread_impl.cc
@@ -103,8 +103,11 @@ void BrowserThreadImpl::Init() {
AtomicWord stored_pointer = base::subtle::NoBarrier_Load(storage);
BrowserThreadDelegate* delegate =
reinterpret_cast<BrowserThreadDelegate*>(stored_pointer);
- if (delegate)
- delegate->Init();
+ if (delegate) {
+ message_loop()->PostTask(
+ FROM_HERE,
+ base::Bind(&BrowserThreadDelegate::Init, base::Unretained(delegate)));
jam 2013/07/11 20:57:13 what guarantee do we have now that BrowserThreadDe
+ }
}
// We disable optimizations for this block of functions so the compiler doesn't

Powered by Google App Engine
This is Rietveld 408576698