Changeset 234462 in webkit


Ignore:
Timestamp:
Aug 1, 2018 11:04:51 AM (6 years ago)
Author:
achristensen@apple.com
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r234461 r234462  
     12018-08-01  Alex Christensen  <achristensen@webkit.org>
     2
     3        Allow WebFramePolicyListenerProxy to be used multiple times
     4        https://bugs.webkit.org/show_bug.cgi?id=188229
     5
     6        Reviewed by Chris Dumez.
     7
     8        This fixes a regression from r234210 in clients that misuse the API.
     9
     10        * UIProcess/WebFramePolicyListenerProxy.cpp:
     11        (WebKit::WebFramePolicyListenerProxy::use):
     12        (WebKit::WebFramePolicyListenerProxy::download):
     13        (WebKit::WebFramePolicyListenerProxy::ignore):
     14
    1152018-08-01  Aditya Keerthi  <akeerthi@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp

    r234210 r234462  
    4343void WebFramePolicyListenerProxy::use(API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap)
    4444{
    45     m_completionHandler(WebCore::PolicyAction::Use, policies, swap);
     45    if (m_completionHandler)
     46        m_completionHandler(WebCore::PolicyAction::Use, policies, swap);
    4647}
    4748
    4849void WebFramePolicyListenerProxy::download()
    4950{
    50     m_completionHandler(WebCore::PolicyAction::Download, nullptr, ShouldProcessSwapIfPossible::No);
     51    if (m_completionHandler)
     52        m_completionHandler(WebCore::PolicyAction::Download, nullptr, ShouldProcessSwapIfPossible::No);
    5153}
    5254
    5355void WebFramePolicyListenerProxy::ignore()
    5456{
    55     m_completionHandler(WebCore::PolicyAction::Ignore, nullptr, ShouldProcessSwapIfPossible::No);
     57    if (m_completionHandler)
     58        m_completionHandler(WebCore::PolicyAction::Ignore, nullptr, ShouldProcessSwapIfPossible::No);
    5659}
    5760
Note: See TracChangeset for help on using the changeset viewer.