Chromium Code Reviews| Index: ios/web/web_state/ui/crw_web_controller.mm |
| diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm |
| index ef9d4bd1dcc9b4acf23e91bbe6b490f279f3ff7c..a434d4a192cff28ef218ac6a78ef500153543b58 100644 |
| --- a/ios/web/web_state/ui/crw_web_controller.mm |
| +++ b/ios/web/web_state/ui/crw_web_controller.mm |
| @@ -2563,8 +2563,10 @@ registerLoadRequestForURL:(const GURL&)requestURL |
| icon_type = web::FaviconURL::TOUCH_ICON; |
| else if (rel == "apple-touch-icon-precomposed") |
| icon_type = web::FaviconURL::TOUCH_PRECOMPOSED_ICON; |
| - urls.push_back( |
| - web::FaviconURL(GURL(href), icon_type, std::vector<gfx::Size>())); |
| + GURL url = GURL(href); |
|
Eugene But (OOO till 7-30)
2017/05/12 15:04:08
WebContentsObserver also has DidUpdateFaviconURL.
gambard
2017/05/12 15:43:39
There is a check if the URL is empty https://cs.ch
|
| + if (url.is_valid()) { |
| + urls.push_back(web::FaviconURL(url, icon_type, std::vector<gfx::Size>())); |
| + } |
| } |
| if (!urls.empty()) |
| _webStateImpl->OnFaviconUrlUpdated(urls); |