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

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

Issue 745053002: Grant access to files in PageState, which have already been validated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 6 years, 1 month 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
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 d0a157cc18c91f4b41912b04774da08400356b9a..774aa86eadc365dfa52cfb41a8bc3e4951477460 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3610,14 +3610,12 @@ void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) {
void WebContentsImpl::UpdateState(RenderViewHost* rvh,
int32 page_id,
const PageState& page_state) {
- // Ensure that this state update comes from either the active RVH or one of
- // the swapped out RVHs. We don't expect to hear from any other RVHs.
+ // Ensure that this state update comes from a RenderViewHost that belongs to
+ // this WebContents.
// TODO(nasko): This should go through RenderFrameHost.
// TODO(creis): We can't update state for cross-process subframes until we
// have FrameNavigationEntries. Once we do, this should be a DCHECK.
- if (rvh != GetRenderViewHost() &&
- !GetRenderManager()->IsRVHOnSwappedOutList(
- static_cast<RenderViewHostImpl*>(rvh)))
Charlie Reis 2014/11/25 21:00:55 This was buggy and causing the test to fail. It m
+ if (rvh->GetDelegate()->GetAsWebContents() != this)
return;
// We must be prepared to handle state updates for any page, these occur

Powered by Google App Engine
This is Rietveld 408576698