diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 20:58:56 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 20:58:56 +0000 |
commit | 3a61fda90474b56779bfe88bfbb126fba99962e7 (patch) | |
tree | 340247053c58c1d004aebfc474d81aba65596133 /chrome_frame/chrome_frame_automation.cc | |
parent | 5703dd2f1793b1653dc2b0441d601bff7b6dd0c4 (diff) | |
download | chromium_src-3a61fda90474b56779bfe88bfbb126fba99962e7.zip chromium_src-3a61fda90474b56779bfe88bfbb126fba99962e7.tar.gz chromium_src-3a61fda90474b56779bfe88bfbb126fba99962e7.tar.bz2 |
Fix a crash reported seen in ChromeFrame in version 8.0.552.215 which was pushed to stable.
Crash occurs while dereferencing a NULL TabProxy pointer.
BUG=65319
TEST=none
Review URL: http://codereview.chromium.org/5625004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 94d30b8..7e5aa6c 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -697,7 +697,7 @@ void ChromeFrameAutomationClient::Uninitialize() { url_fetcher_ = NULL; } - if (tab_.get()) { + if (tab_) { tab_->RemoveObserver(this); if (automation_server_) automation_server_->ReleaseTabProxy(tab_->handle()); @@ -929,7 +929,7 @@ void ChromeFrameAutomationClient::OnChromeFrameHostMoved() { scoped_refptr<TabProxy> tab(tab_); // There also is a possibility that tab_ has not been set yet, // so we still need to test for NULL. - if (tab.get() != NULL) + if (tab) tab->OnHostMoved(); } @@ -1314,8 +1314,8 @@ void ChromeFrameAutomationClient::ReleaseAutomationServer() { void ChromeFrameAutomationClient::SendContextMenuCommandToChromeFrame( int selected_command) { - DCHECK(tab_ != NULL); - tab_->SendContextMenuCommand(selected_command); + if (tab_) + tab_->SendContextMenuCommand(selected_command); } std::wstring ChromeFrameAutomationClient::GetVersion() const { @@ -1341,7 +1341,8 @@ void ChromeFrameAutomationClient::Print(HDC print_dc, } void ChromeFrameAutomationClient::PrintTab() { - tab_->PrintAsync(); + if (tab_) + tab_->PrintAsync(); } bool ChromeFrameAutomationClient::Reinitialize( |