summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_thread_impl.cc
diff options
context:
space:
mode:
authorglider <glider@chromium.org>2015-05-18 06:24:19 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-18 13:24:21 +0000
commit787e3347eb49a59db5e6fe0374f50464f36d48e3 (patch)
tree65004507e5713d6f9c8e275b8829b61c86715da0 /content/browser/browser_thread_impl.cc
parentcfdf46013b37da38c878632b87fa24f1b7997f3d (diff)
downloadchromium_src-787e3347eb49a59db5e6fe0374f50464f36d48e3.zip
chromium_src-787e3347eb49a59db5e6fe0374f50464f36d48e3.tar.gz
chromium_src-787e3347eb49a59db5e6fe0374f50464f36d48e3.tar.bz2
Revert of Reland: Lazily initialize MessageLoop for faster thread startup (patchset #5 id:160001 of https://codereview.chromium.org/1129953004/)
Reason for revert: Massive data race reports, see https://crbug.com/489263 Original issue's description: > Reland: Lazily initialize MessageLoop for faster thread startup > > Original review: https://codereview.chromium.org/1011683002/ > > Reverted because it's suspected for following flakiness issues: > http://crbug.com/485157 - Windows race > http://crbug.com/485091 - Android ThreadWatcher > http://crbug.com/485178 - interactive_ui_tests Menu* tests > > PS1 is the original patch set that gets reverted. > > BUG=465458, 485157, 485091, 485178 > TBR=jam > > Committed: https://crrev.com/8b6133a69f16702a32a3c3104630c4d9ac393b7a > Cr-Commit-Position: refs/heads/master@{#330329} TBR=thakis@chromium.org,toyoshim@chromium.org,jam@chromium.org,kinuko@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=465458, 485157, 485091, 485178 Review URL: https://codereview.chromium.org/1140363002 Cr-Commit-Position: refs/heads/master@{#330351}
Diffstat (limited to 'content/browser/browser_thread_impl.cc')
-rw-r--r--content/browser/browser_thread_impl.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc
index 4ae6607..78e3836 100644
--- a/content/browser/browser_thread_impl.cc
+++ b/content/browser/browser_thread_impl.cc
@@ -159,8 +159,14 @@ void BrowserThreadImpl::Init() {
AtomicWord stored_pointer = base::subtle::NoBarrier_Load(storage);
BrowserThreadDelegate* delegate =
reinterpret_cast<BrowserThreadDelegate*>(stored_pointer);
- if (delegate)
+ if (delegate) {
delegate->Init();
+ message_loop()->PostTask(FROM_HERE,
+ base::Bind(&BrowserThreadDelegate::InitAsync,
+ // Delegate is expected to exist for the
+ // duration of the thread's lifetime
+ base::Unretained(delegate)));
+ }
}
// We disable optimizations for this block of functions so the compiler doesn't