RESOLVED DUPLICATE of bug 18762 36208
dispatchDidFinishLoad() gets called before all resources finished loaded if another frame is loading the same resources
https://bugs.webkit.org/show_bug.cgi?id=36208
Summary dispatchDidFinishLoad() gets called before all resources finished loaded if a...
mitz
Reported 2010-03-16 22:11:44 PDT
Created attachment 50874 [details] Sample project Under certain conditions, dispatchDidFinishLoad() may get called on a FrameLoaderClient before all the frame’s resources have actually finished loading. Specifically, the scenario is as follows: 1. Frame A’s main resource begins loading 2. Frame A kicks off loading of subresource R 3. Frame B’s main resource begins loading 4. Frame B requests the same subresource R 5. Frame B’s main resource finishes loading At that point, frame B’s FrameLoadClient will get dispatchDidFinishLoad(), even though resource R has not finished loading. The reason for this is that Frame B’s DocumentLoader doesn’t track the loading of R, since the Cache::requestResource() returns an already-loading resource (whose ResourceLoader is tracked by Frame A’s DocumentLoader). Thus when Frame B’s main resource finishes loading, its DocumentLoader sees no subresource loaders in progress, and that allows the didFinishLoad to be dispatched. The attached project demonstrates this on Mac OS X. Open the project and build DidNotQuiteFinishLoading. Then copy file1.html, file2.html and common.css into your working directory and run DidNotQuiteFinishLoading. A printed value of rgb(0, 0, 0) indicates that Frame B’s didFinishLoading occurred before the style sheet had actually finished loading. A result of rgb(255, 0, 0) would be correct.
Attachments
Sample project (14.39 KB, application/octet-stream)
2010-03-16 22:11 PDT, mitz
no flags
mitz
Comment 1 2010-03-16 22:12:21 PDT
Andreas Kling
Comment 2 2011-03-02 06:15:40 PST
*** This bug has been marked as a duplicate of bug 18762 ***
Note You need to log in before you can comment on or make changes to this bug.