Commit 1e043393 authored by avi's avatar avi Committed by Commit bot

Revert of Ensure that the browser’s copy of page id is in sync with the...

Revert of Ensure that the browser’s copy of page id is in sync with the renderer’s. (patchset #1 id:1 of https://codereview.chromium.org/795233002/)

Reason for revert:
Still crashing.

Original issue's description:
> Ensure that the browser’s copy of page id is in sync with the renderer’s.
>
> This might-maybe-hope-not crash, and so has debugging statements.
>
> BUG=407376
> TEST=no crashing, we hope
> TBR=rsesek@chromium.org
>
> Committed: https://crrev.com/0eba5c5e63e52330d3409193f5184aaffac45e90
> Cr-Commit-Position: refs/heads/master@{#308036}

TBR=rsesek@chromium.org,creis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=407376

Review URL: https://codereview.chromium.org/803803003

Cr-Commit-Position: refs/heads/master@{#308287}
parent 395281f6
...@@ -167,12 +167,6 @@ size_t RegisterChromeCrashKeys() { ...@@ -167,12 +167,6 @@ size_t RegisterChromeCrashKeys() {
{ "channel_error_bt", kMediumSize }, { "channel_error_bt", kMediumSize },
{ "remove_route_bt", kMediumSize }, { "remove_route_bt", kMediumSize },
{ "rwhvm_window", kMediumSize }, { "rwhvm_window", kMediumSize },
// The following keys are for diagnosing crashes in http://crbug.com/369661.
// They will not be permanent.
{ "renderer_page_id", kSmallSize },
{ "browser_page_id", kSmallSize },
{ "last_committed_page_id", kSmallSize },
// End http://crbug.com/369661
// media/: // media/:
{ "VideoCaptureDeviceQTKit", kSmallSize }, { "VideoCaptureDeviceQTKit", kSmallSize },
#endif #endif
......
...@@ -106,7 +106,6 @@ class CONTENT_EXPORT RenderViewHostDelegate { ...@@ -106,7 +106,6 @@ class CONTENT_EXPORT RenderViewHostDelegate {
// The state for the page changed and should be updated. // The state for the page changed and should be updated.
virtual void UpdateState(RenderViewHost* render_view_host, virtual void UpdateState(RenderViewHost* render_view_host,
int32 rvh_page_id, // http://crbug.com/407376
int32 page_id, int32 page_id,
const PageState& state) {} const PageState& state) {}
......
...@@ -1078,7 +1078,7 @@ void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) { ...@@ -1078,7 +1078,7 @@ void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) {
return; return;
} }
delegate_->UpdateState(this, page_id_, page_id, state); delegate_->UpdateState(this, page_id, state);
} }
void RenderViewHostImpl::OnUpdateTargetURL(const GURL& url) { void RenderViewHostImpl::OnUpdateTargetURL(const GURL& url) {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <utility> #include <utility>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/debug/trace_event.h" #include "base/debug/trace_event.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/logging.h" #include "base/logging.h"
...@@ -3611,33 +3610,8 @@ void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { ...@@ -3611,33 +3610,8 @@ void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) {
} }
void WebContentsImpl::UpdateState(RenderViewHost* rvh, void WebContentsImpl::UpdateState(RenderViewHost* rvh,
int32 rvh_page_id,
int32 page_id, int32 page_id,
const PageState& page_state) { const PageState& page_state) {
if (rvh_page_id != page_id) {
base::debug::SetCrashKeyValue("renderer_page_id",
base::IntToString(page_id));
base::debug::SetCrashKeyValue("browser_page_id",
base::IntToString(rvh_page_id));
NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
controller_.GetLastCommittedEntry());
// The question being answered here is: when there is a page id mismatch
// between the renderer and the browser, which value (if either) matches
// that of the last committed entry?
if (entry) {
if (entry->site_instance() == rvh->GetSiteInstance()) {
base::debug::SetCrashKeyValue("last_committed_page_id",
base::IntToString(entry->GetPageID()));
} else {
base::debug::SetCrashKeyValue("last_committed_page_id",
"site instance mismatch");
}
} else {
base::debug::SetCrashKeyValue("last_committed_page_id", "no entry");
}
CHECK(false);
}
// Ensure that this state update comes from a RenderViewHost that belongs to // Ensure that this state update comes from a RenderViewHost that belongs to
// this WebContents. // this WebContents.
// TODO(nasko): This should go through RenderFrameHost. // TODO(nasko): This should go through RenderFrameHost.
......
...@@ -406,7 +406,6 @@ class CONTENT_EXPORT WebContentsImpl ...@@ -406,7 +406,6 @@ class CONTENT_EXPORT WebContentsImpl
int error_code) override; int error_code) override;
void RenderViewDeleted(RenderViewHost* render_view_host) override; void RenderViewDeleted(RenderViewHost* render_view_host) override;
void UpdateState(RenderViewHost* render_view_host, void UpdateState(RenderViewHost* render_view_host,
int32 rvh_page_id,
int32 page_id, int32 page_id,
const PageState& page_state) override; const PageState& page_state) override;
void UpdateTargetURL(const GURL& url) override; void UpdateTargetURL(const GURL& url) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment