| 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 cef65a924bd6e3cc1036361d9f338427a92ec0de..0b3c0d0689574e5524517f6f655ea2387d36c156 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -780,7 +780,6 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHostImpl* render_view_host,
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
|
| OnRequestPpapiBrokerPermission)
|
| #endif
|
| - IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_ShowValidationMessage,
|
| OnShowValidationMessage)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_HideValidationMessage,
|
| @@ -835,6 +834,7 @@ bool WebContentsImpl::OnMessageReceived(RenderFrameHostImpl* render_frame_host,
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals,
|
| OnUpdatePageImportanceSignals)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_Find_Reply, OnFindReply)
|
| + IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
|
| #if BUILDFLAG(ENABLE_PLUGINS)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated,
|
| OnPepperInstanceCreated)
|
| @@ -4149,13 +4149,19 @@ void WebContentsImpl::OnBrowserPluginMessage(RenderFrameHost* render_frame_host,
|
| #endif // BUILDFLAG(ENABLE_PLUGINS)
|
|
|
| void WebContentsImpl::OnUpdateFaviconURL(
|
| - RenderViewHostImpl* source,
|
| + RenderFrameHostImpl* source,
|
| const std::vector<FaviconURL>& candidates) {
|
| + // Ignore favicons for non-main frame.
|
| + if (source->GetParent()) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| // We get updated favicon URLs after the page stops loading. If a cross-site
|
| // navigation occurs while a page is still loading, the initial page
|
| // may stop loading and send us updated favicon URLs after the navigation
|
| // for the new page has committed.
|
| - if (!source->is_active())
|
| + if (!source->IsCurrent())
|
| return;
|
|
|
| for (auto& observer : observers_)
|
|
|