Title: [221228] trunk/Source/WebCore
Revision
221228
Author
[email protected]
Date
2017-08-26 09:58:22 -0700 (Sat, 26 Aug 2017)

Log Message

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

Patch by Alex Christensen <[email protected]> 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (221227 => 221228)


--- trunk/Source/WebCore/ChangeLog	2017-08-26 16:54:35 UTC (rev 221227)
+++ trunk/Source/WebCore/ChangeLog	2017-08-26 16:58:22 UTC (rev 221228)
@@ -1,3 +1,21 @@
+2017-08-26  Alex Christensen  <[email protected]>
+
+        Remove PolicyChecker::cancelCheck
+        https://bugs.webkit.org/show_bug.cgi?id=176002
+
+        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:
+
 2017-08-26  Michael Catanzaro  <[email protected]>
 
         Unreviewed, tighten up scope of variable in previous commit

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (221227 => 221228)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2017-08-26 16:54:35 UTC (rev 221227)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2017-08-26 16:58:22 UTC (rev 221228)
@@ -1538,7 +1538,7 @@
     RELEASE_ASSERT(frameLoader());
 
     if (m_waitingForContentPolicy || m_waitingForNavigationPolicy) {
-        frameLoader()->policyChecker().cancelCheck();
+        frameLoader()->policyChecker().stopCheck();
         m_waitingForContentPolicy = false;
         m_waitingForNavigationPolicy = false;
     }

Modified: trunk/Source/WebCore/loader/PolicyChecker.cpp (221227 => 221228)


--- trunk/Source/WebCore/loader/PolicyChecker.cpp	2017-08-26 16:54:35 UTC (rev 221227)
+++ trunk/Source/WebCore/loader/PolicyChecker.cpp	2017-08-26 16:58:22 UTC (rev 221228)
@@ -177,12 +177,6 @@
     });
 }
 
-void PolicyChecker::cancelCheck()
-{
-    m_frame.loader().client().cancelPolicyCheck();
-    m_callback = { };
-}
-
 void PolicyChecker::stopCheck()
 {
     m_frame.loader().client().cancelPolicyCheck();

Modified: trunk/Source/WebCore/loader/PolicyChecker.h (221227 => 221228)


--- trunk/Source/WebCore/loader/PolicyChecker.h	2017-08-26 16:54:35 UTC (rev 221227)
+++ trunk/Source/WebCore/loader/PolicyChecker.h	2017-08-26 16:58:22 UTC (rev 221228)
@@ -59,8 +59,6 @@
     void checkNavigationPolicy(const ResourceRequest&, bool didReceiveRedirectResponse, NavigationPolicyDecisionFunction);
     void checkNewWindowPolicy(NavigationAction&&, const ResourceRequest&, FormState*, const String& frameName, NewWindowPolicyDecisionFunction);
 
-    // FIXME: These are different.  They could use better names.
-    void cancelCheck();
     void stopCheck();
 
     void cannotShowMIMEType(const ResourceResponse&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to