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 287d01681cda15a27dfb693ec2606c1838bdc8cf..1d38a0136ebc9b28300c843ce9edf3b9ae44e330 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -7,6 +7,7 @@ |
#include <utility> |
#include "base/command_line.h" |
+#include "base/debug/crash_logging.h" |
#include "base/lazy_instance.h" |
#include "base/location.h" |
#include "base/logging.h" |
@@ -3882,6 +3883,7 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh, |
NavigationEntryImpl* new_entry = controller_.GetEntryWithUniqueID( |
rvhi->nav_entry_id()); |
+ CHECK(new_entry); |
if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { |
// TODO(creis): We can't properly update state for cross-process subframes |
@@ -3889,7 +3891,20 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh, |
// method. |
entry = new_entry; |
} else { |
- DCHECK_EQ(entry, new_entry); |
+ base::debug::SetCrashKeyValue( |
+ "oldindex", base::IntToString(controller_.GetIndexOfEntry(entry))); |
+ base::debug::SetCrashKeyValue( |
+ "newindex", base::IntToString(controller_.GetIndexOfEntry(new_entry))); |
+ base::debug::SetCrashKeyValue( |
+ "lastcommittedindex", |
+ base::IntToString(controller_.GetLastCommittedEntryIndex())); |
+ base::debug::SetCrashKeyValue("oldurl", entry->GetURL().spec()); |
+ base::debug::SetCrashKeyValue("newurl", new_entry->GetURL().spec()); |
+ base::debug::SetCrashKeyValue( |
+ "updatedvalue", page_state.GetTopLevelUrlStringTemporaryForBug369661()); |
+ base::debug::SetCrashKeyValue("oldvalue", entry->GetURL().spec()); |
+ base::debug::SetCrashKeyValue("newvalue", new_entry->GetURL().spec()); |
+ CHECK_EQ(entry, new_entry); |
} |
if (page_state == entry->GetPageState()) |
@@ -4069,7 +4084,22 @@ void WebContentsImpl::UpdateTitle(RenderFrameHost* render_frame_host, |
static_cast<RenderViewHostImpl*>(render_frame_host->GetRenderViewHost()); |
NavigationEntryImpl* new_entry = controller_.GetEntryWithUniqueID( |
rvhi->nav_entry_id()); |
- DCHECK_EQ(entry, new_entry); |
+ |
+ base::debug::SetCrashKeyValue( |
+ "oldindex", base::IntToString(controller_.GetIndexOfEntry(entry))); |
Charlie Reis
2015/08/03 20:41:38
Sanity check: Will this crash if entry is null?
Avi (use Gerrit)
2015/08/03 20:51:53
No, it doesn't care.
|
+ base::debug::SetCrashKeyValue( |
+ "newindex", base::IntToString(controller_.GetIndexOfEntry(new_entry))); |
+ base::debug::SetCrashKeyValue( |
+ "lastcommittedindex", |
+ base::IntToString(controller_.GetLastCommittedEntryIndex())); |
+ base::debug::SetCrashKeyValue("oldurl", entry->GetURL().spec()); |
+ base::debug::SetCrashKeyValue("newurl", new_entry->GetURL().spec()); |
+ base::debug::SetCrashKeyValue("updatedvalue", base::UTF16ToUTF8(title)); |
+ base::debug::SetCrashKeyValue("oldvalue", |
+ base::UTF16ToUTF8(entry->GetTitle())); |
+ base::debug::SetCrashKeyValue("newvalue", |
+ base::UTF16ToUTF8(new_entry->GetTitle())); |
+ CHECK_EQ(entry, new_entry); |
Charlie Reis
2015/08/03 20:41:38
Note: In f2b5526a1c958891, |entry| is null and |ne
Avi (use Gerrit)
2015/08/03 20:51:53
Accounted for in the new patchset.
|
// We can handle title updates when we don't have an entry in |
// UpdateTitleForEntry, but only if the update is from the current RVH. |