summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-07 01:43:54 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-07 01:43:54 +0000
commit080a75e743da4a1f8ce3168c7b573164d360c6af (patch)
treecfc90f6fa8d45a8daccfc214e6dd0ea29cb10195
parentbd61f014feb71a4bd6c25638ad4e877f04cb370f (diff)
downloadchromium_src-080a75e743da4a1f8ce3168c7b573164d360c6af.zip
chromium_src-080a75e743da4a1f8ce3168c7b573164d360c6af.tar.gz
chromium_src-080a75e743da4a1f8ce3168c7b573164d360c6af.tar.bz2
Merge 120668 - Temporary work around for crash. It appears we can get here with no
selected tab, which triggers the crash. This fix is to be merged over to the branch. Subsequentely I'll add some more debugging code to isolate what's triggering the crash. BUG=110909 TEST=none R=pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/9339004 TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9351006 git-svn-id: svn://svn.chromium.org/chrome/branches/1025/src@120682 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/browser_init.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 44b0424..acc970b 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -1224,6 +1224,14 @@ Browser* BrowserInit::LaunchWithProfile::OpenTabsInBrowser(
first_tab = false;
}
+ if (!browser->GetSelectedWebContents()) {
+ // TODO: this is a work around for 110909. Figure out why it's needed.
+ if (!browser->tab_count())
+ browser->AddBlankTab(true);
+ else
+ browser->ActivateTabAt(0, false);
+ }
+
browser->window()->Show();
// TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
// focus explicitly.