summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2014-10-28 09:37:46 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 16:38:28 +0000
commitcd48fff957d58c2201eebee2e057dc33bb2d2be9 (patch)
tree2e1041ace0ba9966744eae475178702aca2f4216
parent210bb34731d9f1980b934eca58aa818980c15a4c (diff)
downloadchromium_src-cd48fff957d58c2201eebee2e057dc33bb2d2be9.zip
chromium_src-cd48fff957d58c2201eebee2e057dc33bb2d2be9.tar.gz
chromium_src-cd48fff957d58c2201eebee2e057dc33bb2d2be9.tar.bz2
Ensure that the browser’s copy of page id is in sync with the renderer’s, for debug builds only
BUG=407376 TEST=none Review URL: https://codereview.chromium.org/676823003 Cr-Commit-Position: refs/heads/master@{#301646}
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index ad6908c..bf94533 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1021,6 +1021,12 @@ void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) {
}
void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) {
+ // If the following DCHECK fails, you have encountered a tricky edge-case that
+ // has evaded reproduction for a very long time. Please report what you were
+ // doing on http://crbug.com/407376, whether or not you can reproduce the
+ // failure.
+ DCHECK_EQ(page_id, page_id_);
+
// Without this check, the renderer can trick the browser into using
// filenames it can't access in a future session restore.
if (!CanAccessFilesOfPageState(state)) {