Title: [221268] trunk/Source/WebKitLegacy/win
Revision
221268
Author
[email protected]
Date
2017-08-28 13:11:45 -0700 (Mon, 28 Aug 2017)

Log Message

[Win] The test http/tests/misc/policy-delegate-called-twice.html is crashing.
https://bugs.webkit.org/show_bug.cgi?id=176031

Reviewed by Brent Fulgham.

When the function in the FramePolicyFunction parameter is called, it has already been moved
to an internal member by the setUpPolicyListener method, and is no longer valid. Invoke the
function by using the stored member instead.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Modified Paths

Diff

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (221267 => 221268)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-28 20:10:16 UTC (rev 221267)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-28 20:11:45 UTC (rev 221268)
@@ -1,3 +1,19 @@
+2017-08-28  Per Arne Vollan  <[email protected]>
+
+        [Win] The test http/tests/misc/policy-delegate-called-twice.html is crashing.
+        https://bugs.webkit.org/show_bug.cgi?id=176031
+
+        Reviewed by Brent Fulgham.
+
+        When the function in the FramePolicyFunction parameter is called, it has already been moved
+        to an internal member by the setUpPolicyListener method, and is no longer valid. Invoke the
+        function by using the stored member instead.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::dispatchDecidePolicyForResponse):
+        (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
+        (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
+
 2017-08-22  Wenson Hsieh  <[email protected]>
 
         Unreviewed, try to fix the Windows build after r221064

Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp (221267 => 221268)


--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp	2017-08-28 20:10:16 UTC (rev 221267)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp	2017-08-28 20:11:45 UTC (rev 221268)
@@ -527,7 +527,7 @@
     if (SUCCEEDED(policyDelegate->decidePolicyForMIMEType(webView, BString(response.mimeType()), urlRequest.get(), m_webFrame, setUpPolicyListener(WTFMove(function)).get())))
         return;
 
-    function(PolicyUse);
+    m_policyListenerPrivate->m_policyFunction(PolicyUse);
 }
 
 void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const NavigationAction& action, const ResourceRequest& request, FormState* formState, const String& frameName, FramePolicyFunction&& function)
@@ -546,7 +546,7 @@
     if (SUCCEEDED(policyDelegate->decidePolicyForNewWindowAction(webView, actionInformation.get(), urlRequest.get(), BString(frameName), setUpPolicyListener(WTFMove(function)).get())))
         return;
 
-    function(PolicyUse);
+    m_policyListenerPrivate->m_policyFunction(PolicyUse);
 }
 
 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const NavigationAction& action, const ResourceRequest& request, bool, FormState* formState, FramePolicyFunction&& function)
@@ -565,7 +565,7 @@
     if (SUCCEEDED(policyDelegate->decidePolicyForNavigationAction(webView, actionInformation.get(), urlRequest.get(), m_webFrame, setUpPolicyListener(WTFMove(function)).get())))
         return;
 
-    function(PolicyUse);
+    m_policyListenerPrivate->m_policyFunction(PolicyUse);
 }
 
 void WebFrameLoaderClient::dispatchUnableToImplementPolicy(const ResourceError& error)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to