Do not clear the pending api request when there's no navigation ID
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Aug 2019 16:08:48 +0000 (16:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Aug 2019 16:08:48 +0000 (16:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201175

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-08-27
Reviewed by Chris Dumez.

After r247851, the pending API request URL is cleared for subresources in some cases.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp

index 50710ce..f19df30 100644 (file)
@@ -1,3 +1,16 @@
+2019-08-27  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Do not clear the pending api request when there's no navigation ID
+        https://bugs.webkit.org/show_bug.cgi?id=201175
+
+        Reviewed by Chris Dumez.
+
+        After r247851, the pending API request URL is cleared for subresources in some cases.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
+        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+
 2019-08-27  Zan Dobersek  <zdobersek@igalia.com>
 
         [CoordGraphics] Delay LayerTreeHost creation in always-on AC until DrawingArea painting is enabled
index efae6df..9c95f02 100644 (file)
@@ -4009,7 +4009,8 @@ void WebPageProxy::didStartProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&
 
     auto transaction = m_pageLoadState.transaction();
 
-    m_pageLoadState.clearPendingAPIRequest(transaction);
+    if (navigation)
+        m_pageLoadState.clearPendingAPIRequest(transaction);
 
     if (frame->isMainFrame()) {
         process->didStartProvisionalLoadForMainFrame(url);
@@ -4657,7 +4658,7 @@ void WebPageProxy::decidePolicyForNavigationAction(Ref<WebProcessProxy>&& proces
     auto transaction = m_pageLoadState.transaction();
 
     bool fromAPI = request.url() == m_pageLoadState.pendingAPIRequestURL();
-    if (!fromAPI)
+    if (navigationID && !fromAPI)
         m_pageLoadState.clearPendingAPIRequest(transaction);
 
     if (!checkURLReceivedFromCurrentOrPreviousWebProcess(process, request.url())) {