summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl_policy.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 20:19:48 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 20:19:48 +0000
commitbba89d313476af018a1fcc7774262c9b65d9e9fc (patch)
tree2bd4999eaa6981819fdfd8e420d38da0af492a57 /chrome/browser/ssl_policy.cc
parent8dd4ed44f21837265f6d54217069d5babb57e048 (diff)
downloadchromium_src-bba89d313476af018a1fcc7774262c9b65d9e9fc.zip
chromium_src-bba89d313476af018a1fcc7774262c9b65d9e9fc.tar.gz
chromium_src-bba89d313476af018a1fcc7774262c9b65d9e9fc.tar.bz2
When a mixed-content resource was loaded, we would apply the mixed-content state to the active entry, which would be the pending entry if there is one.
That caused a problem in cases where a bad resource is loading and we are initiating a navigation from the browser (and therefore creating a pending entry). More details: In the GoodFrame test, the top-frame is HTTPS and we load an HTTP frame with an image. As soon as the bad frame has loaded, we navigate back (creating a pending entry). In rare cases, the notification for the mixed-content image of the HTTP frame would happen after the back action, mistakingly setting the mixed-content state on the pending entry. BUG=2742 TEST=Run the SSL UI tests 1000 times. Review URL: http://codereview.chromium.org/7440 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl_policy.cc')
-rw-r--r--chrome/browser/ssl_policy.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/ssl_policy.cc b/chrome/browser/ssl_policy.cc
index a93b31d..099f5c0 100644
--- a/chrome/browser/ssl_policy.cc
+++ b/chrome/browser/ssl_policy.cc
@@ -317,7 +317,8 @@ class DefaultPolicy : public SSLPolicy {
}
mixed_content_handler->StartRequest(filter_policy);
- NavigationEntry* entry = navigation_controller->GetActiveEntry();
+ NavigationEntry* entry = navigation_controller->GetLastCommittedEntry();
+ DCHECK(entry);
// Even though we are loading the mixed-content resource, it will not be
// included in the page when we set the policy to FILTER_ALL or
// FILTER_ALL_EXCEPT_IMAGES (only images and they are stamped with warning