Unreviewed, address post-landing feedback from Darin for r251019.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Oct 2019 23:29:02 +0000 (23:29 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Oct 2019 23:29:02 +0000 (23:29 +0000)
Added a new comment for clarity.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopForPageCache):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/FrameLoader.cpp

index 1918f3e..10e88c7 100644 (file)
@@ -1,3 +1,12 @@
+2019-10-11  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, address post-landing feedback from Darin for r251019.
+
+        Added a new comment for clarity.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::stopForPageCache):
+
 2019-10-11  Alex Christensen  <achristensen@webkit.org>
 
         Only use CFNetwork SPI for metrics where needed
index ed7409c..61a0aeb 100644 (file)
@@ -1863,7 +1863,8 @@ void FrameLoader::stopForPageCache()
     for (RefPtr<Frame> child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
         child->loader().stopForPageCache();
 
-    // Make sure there are no scheduled loads or policy checks.
+    // We cancel pending navigations & policy checks *after* cancelling loads because cancelling loads might end up
+    // running script, which could schedule new navigations.
     policyChecker().stopCheck();
     m_frame.navigationScheduler().cancel();
 }