diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 01:12:59 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 01:12:59 +0000 |
commit | 0b301b10d81019a30d7e53a3ee91a1ba9a642e25 (patch) | |
tree | cf0c829bc6ff6a595f23b22c9a4e63a67d8058d8 /chrome/browser | |
parent | 9a25a6ba3b977cfa4fa49f4d0a1aec6951205ce1 (diff) | |
download | chromium_src-0b301b10d81019a30d7e53a3ee91a1ba9a642e25.zip chromium_src-0b301b10d81019a30d7e53a3ee91a1ba9a642e25.tar.gz chromium_src-0b301b10d81019a30d7e53a3ee91a1ba9a642e25.tar.bz2 |
Fix the crashes in interactive_ui_tests on Linux.
The cause is really subtle. When I added a db_thread() in BrowserMain, that changed the order that threads were created at. Since interactive ui tests don't run atexitmanager (I filed a bug to make them do), this cascaded into file_posix.cc's InFlightIO singelton caching the first IO MessageLoop pointer. By fluke, previously each IO ML would have the exact same pointer value (must be a unique size for the allocator). My change modified the construction order, so the second run would have a different ChromeThread (file) get the previous IO thread's ML pointer. That led to the asserts. I have added code to start the threads in a predictable manner for now.
BUG=25354
TEST=interactive_ui_tests in Linux stop crashing
Review URL: http://codereview.chromium.org/340017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_main.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 5352c1d..c559f70 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -410,10 +410,6 @@ int BrowserMain(const MainFunctionParams& parameters) { local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, GoogleUpdateSettings::GetCollectStatsConsent()); - // Start the database thread (the order of when this happens in this function - // doesn't matter, all we need is to kick it off). - browser_process->db_thread(); - #if defined(TOOLKIT_GTK) // It is important for this to happen before the first run dialog, as it // styles the dialog as well. @@ -718,6 +714,12 @@ int BrowserMain(const MainFunctionParams& parameters) { net::EnsureWinsockInit(); #endif // defined(OS_WIN) + // Create the child threads. We need to do this since ChromeThread::PostTask + // silently deletes a posted task if the target message loop isn't created. + browser_process->db_thread(); + browser_process->file_thread(); + browser_process->io_thread(); + // Initialize and maintain DNS prefetcher module. chrome_browser_net::DnsPrefetcherInit dns_prefetch(user_prefs, local_state); |