RESOLVED FIXED 174787
Icon loader error on startup
https://bugs.webkit.org/show_bug.cgi?id=174787
Summary Icon loader error on startup
Michael Catanzaro
Reported 2017-07-24 08:59:28 PDT
There is some recent regression in the icon loader causing this error to print every time Epiphany is started (I'm testing with 'epiphany -p'): ERROR: Failed to start load for icon at url /favicon.ico ../../Source/WebCore/loader/icon/IconLoader.cpp(82) : void WebCore::IconLoader::startLoading() Of course /favicon.ico is not a very good place to try loading an icon from.
Attachments
Patch (2.55 KB, patch)
2017-07-25 02:32 PDT, Carlos Garcia Campos
beidson: review-
Patch (4.12 KB, patch)
2017-07-25 10:33 PDT, Carlos Garcia Campos
beidson: review+
Carlos Garcia Campos
Comment 1 2017-07-25 02:27:33 PDT
This is a regression of the new icon loading, it happens with pages that shouldn't have a favicon, like about pages, that's why it happens when starting ephy (about:overview is loaded). IconController::startLoader() did more checks before starting the load that DocumentLoader::startIconLoading() is not doing. It checks that the frame is the main one, the document can have an icon (document url is not empty and not about blank) and that favicon url is in HTTP family. We should do the same checks now before starting to load icons.
Carlos Garcia Campos
Comment 2 2017-07-25 02:28:44 PDT
This is not specific to GTK at all.
Carlos Garcia Campos
Comment 3 2017-07-25 02:32:52 PDT
Build Bot
Comment 4 2017-07-25 02:35:48 PDT
Attachment 316361 [details] did not pass style-queue: ERROR: Source/WebCore/loader/DocumentLoader.cpp:1624: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 5 2017-07-25 10:00:02 PDT
Comment on attachment 316361 [details] Patch Please do not land this until I take a closer look.
Brady Eidson
Comment 6 2017-07-25 10:02:43 PDT
Comment on attachment 316361 [details] Patch Actually no, I can r- right now - Restricting to HTTP is wrong. This will break API tests in IconLoadingDelegate.mm
Brady Eidson
Comment 7 2017-07-25 10:10:06 PDT
Comment on attachment 316361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=316361&action=review > Source/WebCore/loader/DocumentLoader.cpp:1617 > + if (!m_frame->isMainFrame()) > + return; This check is good. > Source/WebCore/loader/DocumentLoader.cpp:1620 > + if (document->url().isEmpty() || document->url().isBlankURL()) > + return; This check is good. > Source/WebCore/loader/DocumentLoader.cpp:1627 > + if (iconURL.protocolIsInHTTPFamily()) This will break an API test. I know this check was in IconController before, but the new client interface is more permissive. If you don't want a non-http default favicon please make the check in your client (e.g. your API-layer icon database)
Carlos Garcia Campos
Comment 8 2017-07-25 10:21:37 PDT
(In reply to Brady Eidson from comment #7) > Comment on attachment 316361 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=316361&action=review > > > Source/WebCore/loader/DocumentLoader.cpp:1617 > > + if (!m_frame->isMainFrame()) > > + return; > > This check is good. > > > Source/WebCore/loader/DocumentLoader.cpp:1620 > > + if (document->url().isEmpty() || document->url().isBlankURL()) > > + return; > > This check is good. > > > Source/WebCore/loader/DocumentLoader.cpp:1627 > > + if (iconURL.protocolIsInHTTPFamily()) > > This will break an API test. > > I know this check was in IconController before, but the new client interface > is more permissive. If you don't want a non-http default favicon please make > the check in your client (e.g. your API-layer icon database) Ok, but note that LinkIconCollector also checks the url is HTTP, so this is inconsistent.
Carlos Garcia Campos
Comment 9 2017-07-25 10:33:43 PDT
Build Bot
Comment 10 2017-07-25 10:36:46 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Build Bot
Comment 11 2017-07-25 10:37:07 PDT
Attachment 316375 [details] did not pass style-queue: ERROR: Source/WebCore/loader/DocumentLoader.cpp:1624: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 12 2017-07-25 10:47:58 PDT
(In reply to Carlos Garcia Campos from comment #8) > (In reply to Brady Eidson from comment #7) > > Comment on attachment 316361 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=316361&action=review > > > > > Source/WebCore/loader/DocumentLoader.cpp:1617 > > > + if (!m_frame->isMainFrame()) > > > + return; > > > > This check is good. > > > > > Source/WebCore/loader/DocumentLoader.cpp:1620 > > > + if (document->url().isEmpty() || document->url().isBlankURL()) > > > + return; > > > > This check is good. > > > > > Source/WebCore/loader/DocumentLoader.cpp:1627 > > > + if (iconURL.protocolIsInHTTPFamily()) > > > > This will break an API test. > > > > I know this check was in IconController before, but the new client interface > > is more permissive. If you don't want a non-http default favicon please make > > the check in your client (e.g. your API-layer icon database) > > Ok, but note that LinkIconCollector also checks the url is HTTP, so this is > inconsistent. Bummer - No API test coverage for that yet. That will likely be changing soon, then.
Brady Eidson
Comment 13 2017-07-25 10:49:08 PDT
Comment on attachment 316375 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=316375&action=review > Source/WebKit/UIProcess/API/glib/WebKitIconLoadingClient.cpp:39 > + // WebCore can send non HTTP icons only when it doesn't find icons in document and > + // falls back to document-url/favicon.ico. We don't want non HTTP icons in that case either. This comment will be outdated soon and I likely won't know to update it. You might just want to mention non-HTTP icons, full stop, and not reference the default favicon case that exists today.
Carlos Garcia Campos
Comment 14 2017-07-25 23:19:56 PDT
Radar WebKit Bug Importer
Comment 15 2017-11-17 14:38:43 PST
Note You need to log in before you can comment on or make changes to this bug.