| 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 253e13548810c5ae985a15dfdadf79d3165012b4..a85fd683d5bb0e044354669b07adcde1a244984a 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -4304,16 +4304,13 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh,
|
| if (rvh->GetDelegate()->GetAsWebContents() != this)
|
| return;
|
|
|
| - if (!rvh->GetMainFrame()) {
|
| - // When UseSubframeNavigationEntries is turned off, state updates only come
|
| - // in on main frames. When UseSubframeNavigationEntries is turned on,
|
| - // UpdateStateForFrame() should have been called rather than this function.
|
| - NOTREACHED();
|
| + if (!rvh->GetMainFrame())
|
| return;
|
| - }
|
|
|
| NavigationEntryImpl* entry = controller_.GetEntryWithUniqueID(
|
| static_cast<RenderFrameHostImpl*>(rvh->GetMainFrame())->nav_entry_id());
|
| + if (!entry)
|
| + return;
|
|
|
| if (page_state == entry->GetPageState())
|
| return; // Nothing to update.
|
|
|