diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 17:06:36 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 17:06:36 +0000 |
commit | 242ceb03d296187713c2c543630a776cf84b19d2 (patch) | |
tree | d48b6139c9bded7c5accb4d3b8e9c579e4937149 /chrome_frame | |
parent | 2881cdbc21dd29e305c452703c399ff786365fe1 (diff) | |
download | chromium_src-242ceb03d296187713c2c543630a776cf84b19d2.zip chromium_src-242ceb03d296187713c2c543630a776cf84b19d2.tar.gz chromium_src-242ceb03d296187713c2c543630a776cf84b19d2.tar.bz2 |
Attempt to handle a case whereby we've lost our automation server.
TEST=See bug.
BUG=52894
Review URL: http://codereview.chromium.org/3122041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57539 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_active_document.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc index 7443943..1c967f0 100644 --- a/chrome_frame/chrome_active_document.cc +++ b/chrome_frame/chrome_active_document.cc @@ -975,9 +975,18 @@ HRESULT ChromeActiveDocument::IEExec(const GUID* cmd_group_guid, bool ChromeActiveDocument::LaunchUrl(const ChromeFrameUrl& cf_url, const std::string& referrer) { - DCHECK(automation_client_.get() != NULL); DCHECK(!cf_url.gurl().is_empty()); + if (!automation_client_.get()) { + // http://code.google.com/p/chromium/issues/detail?id=52894 + // Still not sure how this happens. + DLOG(ERROR) << "No automation client!"; + if (!Initialize()) { + NOTREACHED() << "...and failed to start a new one >:("; + return false; + } + } + url_.Allocate(UTF8ToWide(cf_url.gurl().spec()).c_str()); if (cf_url.attach_to_external_tab()) { dimensions_ = cf_url.dimensions(); @@ -1020,6 +1029,7 @@ HRESULT ChromeActiveDocument::OnRefreshPage(const GUID* cmd_group_guid, tab_proxy->ReloadAsync(); } else { DLOG(ERROR) << "No automation proxy"; + DCHECK(automation_client_.get() != NULL) << "how did it get freed?"; // The current url request manager (url_fetcher_) has been switched to // a stopping state so we need to reset it and get a new one for the new // automation server. |