summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 17:15:42 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 17:15:42 +0000
commit1a3861a91760e4f95e580c15592eadc0c13452ae (patch)
tree50410349e0a61ff0b7b63210f9824916569e8f17 /chrome/browser/browser_process_impl.cc
parentb41f1fc60dae06b6b5070d3d12ff2c38b0c0dd52 (diff)
downloadchromium_src-1a3861a91760e4f95e580c15592eadc0c13452ae.zip
chromium_src-1a3861a91760e4f95e580c15592eadc0c13452ae.tar.gz
chromium_src-1a3861a91760e4f95e580c15592eadc0c13452ae.tar.bz2
Fix the "pick a new user data dir" dialog on windows.
There were three things to be fixed: 1) We don't need to run a separate message loop after the dialog closes. The MessageLoopForUI handles this properly. 2) When tearing down browser_process_impl, io_loop hasn't been initialized yet, so we check to make sure it exists before using it. 3) We don't call window->Close() because that deletes the dialog class before we're done using it. This means we leak the window, but that's ok because we're going to exit anyway. Review URL: http://codereview.chromium.org/114004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 7a09320..72e06f1 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -168,8 +168,10 @@ BrowserProcessImpl::~BrowserProcessImpl() {
// Shutdown DNS prefetching now to ensure that network stack objects
// living on the IO thread get destroyed before the IO thread goes away.
- io_thread_->message_loop()->PostTask(FROM_HERE,
- NewRunnableFunction(chrome_browser_net::EnsureDnsPrefetchShutdown));
+ if (io_thread_.get()) {
+ io_thread_->message_loop()->PostTask(FROM_HERE,
+ NewRunnableFunction(chrome_browser_net::EnsureDnsPrefetchShutdown));
+ }
#if defined(OS_LINUX)
// The IO thread must outlive the BACKGROUND_X11 thread.