Skip to content
  • darin@apple.com's avatar
    Tighten up the ScheduledRedirection machinery to prepare for a bug fix · 4d9d718c
    darin@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=29663
    
    Patch by Darin Adler <darin@apple.com> on 2009-09-22
    Reviewed by Sam Weinig.
    
    WebCore: 
    
    * loader/FrameLoader.cpp:
    (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
    initialized to false, to keep track if the redirection has been
    communicated to the client.
    (WebCore::FrameLoader::stopLoading): Tweaked a comment.
    (WebCore::FrameLoader::cancelRedirection): Removed code to clear
    m_scheduledRedirection.clear since stopRedirectionTimer does that now.
    (WebCore::FrameLoader::allChildrenAreComplete): Added.
    (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
    function for clarity.
    (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
    (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
    (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
    toldClient flag and not call clientRedirected a second time if it is set.
    (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
    called multiple times and it will call clientRedirectCancelledOrFinished
    only once.
    
    * loader/FrameLoader.h: Changed scheduleRedirection to be a PassOwnPtr.
    Added allChildrenAreComplete function.
    
    LayoutTests: 
    
    * http/tests/loading/deleted-host-in-resource-load-delegate-callback-expected.txt:
    Updated test to reflect progression. The willPerformClientRedirectToURL
    call was called an extra time before.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4d9d718c