diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 17:22:08 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 17:22:08 +0000 |
commit | 7de37fb6af07c84deee63f6a1baec91e0290c830 (patch) | |
tree | 8814d645887ef852d688032f1e2dd22efc1b2f3a | |
parent | df39f6702088e67affba1f57ab80811dd7a8eb56 (diff) | |
download | chromium_src-7de37fb6af07c84deee63f6a1baec91e0290c830.zip chromium_src-7de37fb6af07c84deee63f6a1baec91e0290c830.tar.gz chromium_src-7de37fb6af07c84deee63f6a1baec91e0290c830.tar.bz2 |
Crashers from the field indicate the navigation entry can be NULL. This is not expected and not clear how this happen.
Working-around the crasher.
BUG=http://crbug.com/15605
TEST=None
Review URL: http://codereview.chromium.org/150185
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20037 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index 1986171..2eff140 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -335,6 +335,19 @@ void InterstitialPage::UpdateTitle(RenderViewHost* render_view_host, const std::wstring& title) { DCHECK(render_view_host == render_view_host_); NavigationEntry* entry = tab_->controller().GetActiveEntry(); + if (!entry) { + // Crash reports from the field indicate this can be NULL. + // This is unexpected as InterstitialPages constructed with the + // new_navigation flag set to true create a transient navigation entry + // (that is returned as the active entry). And the only case so far of + // interstitial created with that flag set to false is with the + // SafeBrowsingBlockingPage, when the resource triggering the interstitial + // is a sub-resource, meaning the main page has already been loaded and a + // navigation entry should have been created. + NOTREACHED(); + return; + } + // If this interstitial is shown on an existing navigation entry, we'll need // to remember its title so we can revert to it when hidden. if (!new_navigation_ && !should_revert_tab_title_) { |