Title: [221360] releases/WebKitGTK/webkit-2.18/Source/WebCore
Revision
221360
Author
carlo...@webkit.org
Date
2017-08-30 03:09:40 -0700 (Wed, 30 Aug 2017)

Log Message

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

Patch by Alex Christensen <achristen...@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:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog (221359 => 221360)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog	2017-08-30 10:07:57 UTC (rev 221359)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog	2017-08-30 10:09:40 UTC (rev 221360)
@@ -1,3 +1,21 @@
+2017-08-26  Alex Christensen  <achristen...@webkit.org>
+
+        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-25  Daniel Bates  <daba...@apple.com>
 
         InlineTextBox::paintDocumentMarker() does not need to special case painting of grammar and

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/DocumentLoader.cpp (221359 => 221360)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/DocumentLoader.cpp	2017-08-30 10:07:57 UTC (rev 221359)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/DocumentLoader.cpp	2017-08-30 10:09:40 UTC (rev 221360)
@@ -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: releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/PolicyChecker.cpp (221359 => 221360)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/PolicyChecker.cpp	2017-08-30 10:07:57 UTC (rev 221359)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/PolicyChecker.cpp	2017-08-30 10:09:40 UTC (rev 221360)
@@ -177,12 +177,6 @@
     });
 }
 
-void PolicyChecker::cancelCheck()
-{
-    m_frame.loader().client().cancelPolicyCheck();
-    m_callback = { };
-}
-
 void PolicyChecker::stopCheck()
 {
     m_frame.loader().client().cancelPolicyCheck();

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/PolicyChecker.h (221359 => 221360)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/PolicyChecker.h	2017-08-30 10:07:57 UTC (rev 221359)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/loader/PolicyChecker.h	2017-08-30 10:09:40 UTC (rev 221360)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to