Comment #5 on issue 131567 by
arus...@chromium.org: iframes load/reload
WebKit's IconController is fine -- IconController::startLoader() is aware
whether the loader is loading a main frame (in this case it deals with the
IconDatabase that doesn't appear to be enabled) or something else (in this
case it ignores the request).
The root causes:
- We update the set of favicon URLs every time any (sub-/main) frame
didStopLoading(), and
- We do not cache (probably rightfully so) "missing" favicons / failed HTTP
requests.
The sequence of events:
- ChromeRenderViewObserver::DidStopLoading() is getting called for _any_
frame;
- It grabs the set of icon URLs for the _main frame_ and sends it over with
UpdateFaviconURL;
- FaviconHandler::OnUpdateFaviconURL effectively resets the set of
candidates and triggers the history queries.
If the pages contains more than one frame, then DidStopLoading() will be
called 1) multiple times during the loading and 2) whenver any of the
frames is updated.
This triggers spurious history fetches, but because we do not cache
_missing_ favicons, this effectively causes a full HTTP request.
Also, I suspect (but don't have it confirmed) is a "racing" condition of
sorts: while FaviconHandler is busy HTTP-downloading favicons, the frames
on the page could keep reporting DidStopLoading(), which resets the set of
candidates, and we keep re-requesting the same exact URLs we have just
attempted to request.
I have a number of ideas of what and how to fix, but I'm not sufficiently
competent to know what is expected.