summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ssl_manager.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/ssl_manager.cc b/chrome/browser/ssl_manager.cc
index 2a875d4..5ff8778 100644
--- a/chrome/browser/ssl_manager.cc
+++ b/chrome/browser/ssl_manager.cc
@@ -468,12 +468,24 @@ void SSLManager::OnMixedContentRequest(ResourceDispatcherHost* rdh,
void SSLManager::OnCertError(CertError* error) {
// Ask our delegate to deal with the error.
NavigationEntry* entry = controller_->GetActiveEntry();
+ // We might not have a navigation entry in some cases (e.g. when a
+ // HTTPS page opens a popup with no URL and then populate it with
+ // document.write()). See bug http://crbug.com/3845.
+ if (!entry)
+ return;
+
delegate()->OnCertError(entry->url(), error);
}
void SSLManager::OnMixedContent(MixedContentHandler* mixed_content) {
// Ask our delegate to deal with the mixed content.
NavigationEntry* entry = controller_->GetActiveEntry();
+ // We might not have a navigation entry in some cases (e.g. when a
+ // HTTPS page opens a popup with no URL and then populate it with
+ // document.write()). See bug http://crbug.com/3845.
+ if (!entry)
+ return;
+
delegate()->OnMixedContent(controller_, entry->url(), mixed_content);
}