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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 14066022: Use the last committed entry in DidStopLoading, not the pending entry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 1cc9efeb07d5d0d8db9b1ba5c1b0c9cd08108f7b..c8a9e7a13b8252beaf6e6958d7f73993981150c8 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2849,7 +2849,10 @@ void WebContentsImpl::DidStartLoading(RenderViewHost* render_view_host) {
void WebContentsImpl::DidStopLoading(RenderViewHost* render_view_host) {
scoped_ptr<LoadNotificationDetails> details;
- NavigationEntry* entry = controller_.GetActiveEntry();
+ // Use the last committed entry rather than the active one, in case a
+ // pending entry has been created.
+ NavigationEntry* entry = controller_.GetLastCommittedEntry();
+
// An entry may not exist for a stop when loading an initial blank page or
// if an iframe injected by script into a blank page finishes loading.
if (entry) {
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698