Title: [234462] trunk/Source/WebKit
- Revision
- 234462
- Author
- achristen...@apple.com
- Date
- 2018-08-01 11:04:51 -0700 (Wed, 01 Aug 2018)
Log Message
Allow WebFramePolicyListenerProxy to be used multiple times
https://bugs.webkit.org/show_bug.cgi?id=188229
Reviewed by Chris Dumez.
This fixes a regression from r234210 in clients that misuse the API.
* UIProcess/WebFramePolicyListenerProxy.cpp:
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (234461 => 234462)
--- trunk/Source/WebKit/ChangeLog 2018-08-01 17:26:17 UTC (rev 234461)
+++ trunk/Source/WebKit/ChangeLog 2018-08-01 18:04:51 UTC (rev 234462)
@@ -1,3 +1,17 @@
+2018-08-01 Alex Christensen <achristen...@webkit.org>
+
+ Allow WebFramePolicyListenerProxy to be used multiple times
+ https://bugs.webkit.org/show_bug.cgi?id=188229
+
+ Reviewed by Chris Dumez.
+
+ This fixes a regression from r234210 in clients that misuse the API.
+
+ * UIProcess/WebFramePolicyListenerProxy.cpp:
+ (WebKit::WebFramePolicyListenerProxy::use):
+ (WebKit::WebFramePolicyListenerProxy::download):
+ (WebKit::WebFramePolicyListenerProxy::ignore):
+
2018-08-01 Aditya Keerthi <akeer...@apple.com>
[iOS] Color picker should have a border when presented in a popover
Modified: trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp (234461 => 234462)
--- trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp 2018-08-01 17:26:17 UTC (rev 234461)
+++ trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp 2018-08-01 18:04:51 UTC (rev 234462)
@@ -42,17 +42,20 @@
void WebFramePolicyListenerProxy::use(API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap)
{
- m_completionHandler(WebCore::PolicyAction::Use, policies, swap);
+ if (m_completionHandler)
+ m_completionHandler(WebCore::PolicyAction::Use, policies, swap);
}
void WebFramePolicyListenerProxy::download()
{
- m_completionHandler(WebCore::PolicyAction::Download, nullptr, ShouldProcessSwapIfPossible::No);
+ if (m_completionHandler)
+ m_completionHandler(WebCore::PolicyAction::Download, nullptr, ShouldProcessSwapIfPossible::No);
}
void WebFramePolicyListenerProxy::ignore()
{
- m_completionHandler(WebCore::PolicyAction::Ignore, nullptr, ShouldProcessSwapIfPossible::No);
+ if (m_completionHandler)
+ m_completionHandler(WebCore::PolicyAction::Ignore, nullptr, ShouldProcessSwapIfPossible::No);
}
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes