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

Unified Diff: chrome/browser/ssl_blocking_page.cc

Issue 1898: Fix crasher when closing tab with bad SSL constrained popup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 | chrome/browser/ssl_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl_blocking_page.cc
===================================================================
--- chrome/browser/ssl_blocking_page.cc (revision 1864)
+++ chrome/browser/ssl_blocking_page.cc (working copy)
@@ -171,7 +171,10 @@
// the last entry is kept for the restoring on next start-up.
Browser* browser = Browser::GetBrowserForController(tab_->controller(),
NULL);
- if (remove_last_entry_ &&
+ // We may not have a browser (this is the case for constrained popups), in
+ // which case it does not matter if we do not remove the temporary entry
+ // as their navigation history is not saved.
+ if (remove_last_entry_ && browser &&
!browser->tabstrip_model()->closing_all()) {
tab_->controller()->RemoveLastEntry();
}
« no previous file with comments | « no previous file | chrome/browser/ssl_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698