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) { |