⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 221228 in webkit


Ignore:
Timestamp:
Aug 26, 2017, 9:58:22 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Remove PolicyChecker::cancelCheck
​https://bugs.webkit.org/show_bug.cgi?id=176002

Patch by Alex Christensen <​achristensen@webkit.org> on 2017-08-26
Reviewed by Darin Adler.

cancelCheck is conceptually equivalent to not calling a completion handler.
stopCheck is conceptually equivalent to calling a completion handler with PolicyIgnore just before cleaning up everything,
which is semantically cleaner and necessary when I replace the last use of PolicyCallback with a CompletionHandler.
Before this change, we were probably causing some loading objects to hang right before deleting them, and this cleans them up better.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::cancelCheck): Deleted.

  • loader/PolicyChecker.h:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r221227 r221228  
     12017-08-26  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove PolicyChecker::cancelCheck
     4        https://bugs.webkit.org/show_bug.cgi?id=176002
     5
     6        Reviewed by Darin Adler.
     7
     8        cancelCheck is conceptually equivalent to not calling a completion handler.
     9        stopCheck is conceptually equivalent to calling a completion handler with PolicyIgnore just before cleaning up everything,
     10        which is semantically cleaner and necessary when I replace the last use of PolicyCallback with a CompletionHandler.
     11        Before this change, we were probably causing some loading objects to hang right before deleting them, and this cleans them up better.
     12
     13        * loader/DocumentLoader.cpp:
     14        (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):
     15        * loader/PolicyChecker.cpp:
     16        (WebCore::PolicyChecker::cancelCheck): Deleted.
     17        * loader/PolicyChecker.h:
     18
    1192017-08-26  Michael Catanzaro  <mcatanzaro@igalia.com>
    220
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r221103 r221228  
    15391539
    15401540    if (m_waitingForContentPolicy || m_waitingForNavigationPolicy) {
    1541         frameLoader()->policyChecker().cancelCheck();
     1541        frameLoader()->policyChecker().stopCheck();
    15421542        m_waitingForContentPolicy = false;
    15431543        m_waitingForNavigationPolicy = false;
  • trunk/Source/WebCore/loader/PolicyChecker.cpp

    r221162 r221228  
    178178}
    179179
    180 void PolicyChecker::cancelCheck()
    181 {
    182     m_frame.loader().client().cancelPolicyCheck();
    183     m_callback = { };
    184 }
    185 
    186180void PolicyChecker::stopCheck()
    187181{
  • trunk/Source/WebCore/loader/PolicyChecker.h

    r221162 r221228  
    6060    void checkNewWindowPolicy(NavigationAction&&, const ResourceRequest&, FormState*, const String& frameName, NewWindowPolicyDecisionFunction);
    6161
    62     // FIXME: These are different.  They could use better names.
    63     void cancelCheck();
    6462    void stopCheck();
    6563
Note: See TracChangeset for help on using the changeset viewer.