Chromium Code Reviews| 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 |