ProgressTracker never completes if iframe detached during parsing
authorjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Aug 2012 00:02:23 +0000 (00:02 +0000)
committerjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Aug 2012 00:02:23 +0000 (00:02 +0000)
commit48fc014a05feb5c4efe692bde82ec094b0e92c91
treec780634603ac4ef983e3adbe60c8406891dfb025
parentbc67f4c196328075bf6e66b4543f87b1f6ceedfc
ProgressTracker never completes if iframe detached during parsing
https://bugs.webkit.org/show_bug.cgi?id=92272

Reviewed by Adam Barth.

Add a simple helper class to FrameLoader to ensure progressStarted/progressCompleted calls are matched,
and balance the calls when the Frame is detached.

No new tests, as this behavior has only been producing reliably by setting a breakpoint in a specific place.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::FrameProgressTracker::progressStarted):
(WebCore::FrameLoader::FrameProgressTracker::progressCompleted):
(WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::clearProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::detachFromParent):
* loader/FrameLoader.h:
(FrameProgressTracker):
(WebCore::FrameLoader::FrameProgressTracker::create):
(WebCore::FrameLoader::FrameProgressTracker::FrameProgressTracker):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h