REGRESSION: API tests WebKit.ProcessDidTerminateRequestedByClient and WebKit.ProcessD...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 19:49:55 +0000 (19:49 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 19:49:55 +0000 (19:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177764

Reviewed by Chris Dumez.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
I shouldn't have reverted the A API telling the listener to continue if there's no client function.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKPage.cpp

index 2dc1d4f..67a6396 100644 (file)
@@ -1,3 +1,14 @@
+2017-10-02  Alex Christensen  <achristensen@webkit.org>
+
+        REGRESSION: API tests WebKit.ProcessDidTerminateRequestedByClient and WebKit.ProcessDidTerminateWithReasonCrash are timing out
+        https://bugs.webkit.org/show_bug.cgi?id=177764
+
+        Reviewed by Chris Dumez.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageNavigationClient):
+        I shouldn't have reverted the A API telling the listener to continue if there's no client function.
+
 2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
index 8f034a2..cc7f6f7 100644 (file)
@@ -2142,15 +2142,19 @@ void WKPageSetPageNavigationClient(WKPageRef pageRef, const WKPageNavigationClie
     private:
         void decidePolicyForNavigationAction(WebPageProxy& page, Ref<API::NavigationAction>&& navigationAction, Ref<WebKit::WebFramePolicyListenerProxy>&& listener, API::Object* userData) final
         {
-            if (!m_client.decidePolicyForNavigationAction)
+            if (!m_client.decidePolicyForNavigationAction) {
+                listener->use({ });
                 return;
+            }
             m_client.decidePolicyForNavigationAction(toAPI(&page), toAPI(navigationAction.ptr()), toAPI(listener.ptr()), toAPI(userData), m_client.base.clientInfo);
         }
 
         void decidePolicyForNavigationResponse(WebPageProxy& page, API::NavigationResponse& navigationResponse, Ref<WebKit::WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
         {
-            if (!m_client.decidePolicyForNavigationResponse)
+            if (!m_client.decidePolicyForNavigationResponse) {
+                listener->use({ });
                 return;
+            }
             m_client.decidePolicyForNavigationResponse(toAPI(&page), toAPI(&navigationResponse), toAPI(listener.ptr()), toAPI(userData), m_client.base.clientInfo);
         }