Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(950)

Unified Diff: chrome/browser/ssl_manager.cc

Issue 17218: Fix for a crasher in SSLManager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl_manager.cc
===================================================================
--- chrome/browser/ssl_manager.cc (revision 7623)
+++ chrome/browser/ssl_manager.cc (working copy)
@@ -468,12 +468,24 @@
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698