<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[259695] branches/safari-610.1.9-branch/Source/WebKit</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/259695">259695</a></dd>
<dt>Author</dt> <dd>repstein@apple.com</dd>
<dt>Date</dt> <dd>2020-04-07 17:43:11 -0700 (Tue, 07 Apr 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/259615">r259615</a>. rdar://problem/61360282

    Create a way to signal if the WKAppBoundDomains list is empty
    https://bugs.webkit.org/show_bug.cgi?id=210074
    <rdar://problem/61359228>

    Reviewed by Brent Fulgham.

    Updates the WebFramePolicyListener to return an Optional<NavigatingToAppBoundDomain>
    to signal if the WKAppBoundDomains list is empty. If so, we don't want to update
    any app-bound domain parameters in WebPageProxy.

    * UIProcess/WebFramePolicyListenerProxy.cpp:
    (WebKit::WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult):
    * UIProcess/WebFramePolicyListenerProxy.h:
    * UIProcess/WebFrameProxy.cpp:
    (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
    * UIProcess/WebFrameProxy.h:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::decidePolicyForNavigationAction):
    (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
    (WebKit::WebPageProxy::decidePolicyForResponseShared):
    * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
    (WebKit::WebsiteDataStore::beginAppBoundDomainCheck):
    Changed the WebFramePolicyListener to take a NavigatingToAppBoundDomain
    type as opposed to a boolean to allow it to handle the empty value.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259615 268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari61019branchSourceWebKitChangeLog">branches/safari-610.1.9-branch/Source/WebKit/ChangeLog</a></li>
<li><a href="#branchessafari61019branchSourceWebKitUIProcessWebFramePolicyListenerProxycpp">branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp</a></li>
<li><a href="#branchessafari61019branchSourceWebKitUIProcessWebFramePolicyListenerProxyh">branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h</a></li>
<li><a href="#branchessafari61019branchSourceWebKitUIProcessWebFrameProxycpp">branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.cpp</a></li>
<li><a href="#branchessafari61019branchSourceWebKitUIProcessWebFrameProxyh">branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.h</a></li>
<li><a href="#branchessafari61019branchSourceWebKitUIProcessWebPageProxycpp">branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#branchessafari61019branchSourceWebKitUIProcessWebsiteDataCocoaWebsiteDataStoreCocoamm">branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari61019branchSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-610.1.9-branch/Source/WebKit/ChangeLog (259694 => 259695)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610.1.9-branch/Source/WebKit/ChangeLog   2020-04-08 00:38:33 UTC (rev 259694)
+++ branches/safari-610.1.9-branch/Source/WebKit/ChangeLog      2020-04-08 00:43:11 UTC (rev 259695)
</span><span class="lines">@@ -1,3 +1,62 @@
</span><ins>+2020-04-07  Alan Coon  <alancoon@apple.com>
+
+        Cherry-pick r259615. rdar://problem/61360282
+
+    Create a way to signal if the WKAppBoundDomains list is empty
+    https://bugs.webkit.org/show_bug.cgi?id=210074
+    <rdar://problem/61359228>
+    
+    Reviewed by Brent Fulgham.
+    
+    Updates the WebFramePolicyListener to return an Optional<NavigatingToAppBoundDomain>
+    to signal if the WKAppBoundDomains list is empty. If so, we don't want to update
+    any app-bound domain parameters in WebPageProxy.
+    
+    * UIProcess/WebFramePolicyListenerProxy.cpp:
+    (WebKit::WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult):
+    * UIProcess/WebFramePolicyListenerProxy.h:
+    * UIProcess/WebFrameProxy.cpp:
+    (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
+    * UIProcess/WebFrameProxy.h:
+    * UIProcess/WebPageProxy.cpp:
+    (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+    (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
+    (WebKit::WebPageProxy::decidePolicyForResponseShared):
+    * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+    (WebKit::WebsiteDataStore::beginAppBoundDomainCheck):
+    Changed the WebFramePolicyListener to take a NavigatingToAppBoundDomain
+    type as opposed to a boolean to allow it to handle the empty value.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-04-06  Kate Cheney  <katherine_cheney@apple.com>
+
+            Create a way to signal if the WKAppBoundDomains list is empty
+            https://bugs.webkit.org/show_bug.cgi?id=210074
+            <rdar://problem/61359228>
+
+            Reviewed by Brent Fulgham.
+
+            Updates the WebFramePolicyListener to return an Optional<NavigatingToAppBoundDomain>
+            to signal if the WKAppBoundDomains list is empty. If so, we don't want to update
+            any app-bound domain parameters in WebPageProxy.
+
+            * UIProcess/WebFramePolicyListenerProxy.cpp:
+            (WebKit::WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult):
+            * UIProcess/WebFramePolicyListenerProxy.h:
+            * UIProcess/WebFrameProxy.cpp:
+            (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
+            * UIProcess/WebFrameProxy.h:
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+            (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
+            (WebKit::WebPageProxy::decidePolicyForResponseShared):
+            * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+            (WebKit::WebsiteDataStore::beginAppBoundDomainCheck):
+            Changed the WebFramePolicyListener to take a NavigatingToAppBoundDomain
+            type as opposed to a boolean to allow it to handle the empty value.
+
</ins><span class="cx"> 2020-04-04  Wenson Hsieh  <wenson_hsieh@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Add a fourth round of logging to help diagnose <webkit.org/b/209685>
</span></span></pre></div>
<a id="branchessafari61019branchSourceWebKitUIProcessWebFramePolicyListenerProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp (259694 => 259695)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp   2020-04-08 00:38:33 UTC (rev 259694)
+++ branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp      2020-04-08 00:43:11 UTC (rev 259695)
</span><span class="lines">@@ -46,16 +46,15 @@
</span><span class="cx"> 
</span><span class="cx"> WebFramePolicyListenerProxy::~WebFramePolicyListenerProxy() = default;
</span><span class="cx"> 
</span><del>-void WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult(bool isNavigatingToAppBoundDomain)
</del><ins>+void WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult(Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    auto isAppBound = isNavigatingToAppBoundDomain ? NavigatingToAppBoundDomain::Yes : NavigatingToAppBoundDomain::No;
</del><span class="cx">     if (m_policyResult && m_safeBrowsingWarning) {
</span><span class="cx">         if (m_reply)
</span><del>-            m_reply(WebCore::PolicyAction::Use, m_policyResult->first.get(), m_policyResult->second, WTFMove(*m_safeBrowsingWarning), isAppBound);
</del><ins>+            m_reply(WebCore::PolicyAction::Use, m_policyResult->first.get(), m_policyResult->second, WTFMove(*m_safeBrowsingWarning), isNavigatingToAppBoundDomain);
</ins><span class="cx">     } else
</span><del>-        m_isNavigatingToAppBoundDomain = isAppBound;
</del><ins>+        m_isNavigatingToAppBoundDomain = isNavigatingToAppBoundDomain;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults(RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning)
</span></span></pre></div>
<a id="branchessafari61019branchSourceWebKitUIProcessWebFramePolicyListenerProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h (259694 => 259695)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h     2020-04-08 00:38:33 UTC (rev 259694)
+++ branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h        2020-04-08 00:43:11 UTC (rev 259695)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> class WebFramePolicyListenerProxy : public API::ObjectImpl<API::Object::Type::FramePolicyListener> {
</span><span class="cx"> public:
</span><span class="cx"> 
</span><del>-    using Reply = CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&&, NavigatingToAppBoundDomain)>;
</del><ins>+    using Reply = CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&&, Optional<NavigatingToAppBoundDomain>)>;
</ins><span class="cx">     static Ref<WebFramePolicyListenerProxy> create(Reply&& reply, ShouldExpectSafeBrowsingResult expectSafeBrowsingResult, ShouldExpectAppBoundDomainResult expectAppBoundDomainResult)
</span><span class="cx">     {
</span><span class="cx">         return adoptRef(*new WebFramePolicyListenerProxy(WTFMove(reply), expectSafeBrowsingResult, expectAppBoundDomainResult));
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">     void ignore();
</span><span class="cx">     
</span><span class="cx">     void didReceiveSafeBrowsingResults(RefPtr<SafeBrowsingWarning>&&);
</span><del>-    void didReceiveAppBoundDomainResult(bool);
</del><ins>+    void didReceiveAppBoundDomainResult(Optional<NavigatingToAppBoundDomain>);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebFramePolicyListenerProxy(Reply&&, ShouldExpectSafeBrowsingResult, ShouldExpectAppBoundDomainResult);
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> 
</span><span class="cx">     Optional<std::pair<RefPtr<API::WebsitePolicies>, ProcessSwapRequestedByClient>> m_policyResult;
</span><span class="cx">     Optional<RefPtr<SafeBrowsingWarning>> m_safeBrowsingWarning;
</span><del>-    Optional<NavigatingToAppBoundDomain> m_isNavigatingToAppBoundDomain;
</del><ins>+    Optional<Optional<NavigatingToAppBoundDomain>> m_isNavigatingToAppBoundDomain;
</ins><span class="cx">     Reply m_reply;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari61019branchSourceWebKitUIProcessWebFrameProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.cpp (259694 => 259695)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.cpp 2020-04-08 00:38:33 UTC (rev 259694)
+++ branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.cpp    2020-04-08 00:43:11 UTC (rev 259695)
</span><span class="lines">@@ -193,11 +193,11 @@
</span><span class="cx">     m_title = title;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebFramePolicyListenerProxy& WebFrameProxy::setUpPolicyListenerProxy(CompletionHandler<void(PolicyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&&, NavigatingToAppBoundDomain)>&& completionHandler, ShouldExpectSafeBrowsingResult expectSafeBrowsingResult, ShouldExpectAppBoundDomainResult expectAppBoundDomainResult)
</del><ins>+WebFramePolicyListenerProxy& WebFrameProxy::setUpPolicyListenerProxy(CompletionHandler<void(PolicyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&&, Optional<NavigatingToAppBoundDomain>)>&& completionHandler, ShouldExpectSafeBrowsingResult expectSafeBrowsingResult, ShouldExpectAppBoundDomainResult expectAppBoundDomainResult)
</ins><span class="cx"> {
</span><span class="cx">     if (m_activeListener)
</span><span class="cx">         m_activeListener->ignore();
</span><del>-    m_activeListener = WebFramePolicyListenerProxy::create([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (PolicyAction action, API::WebsitePolicies* policies, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain) mutable {
</del><ins>+    m_activeListener = WebFramePolicyListenerProxy::create([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (PolicyAction action, API::WebsitePolicies* policies, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain) mutable {
</ins><span class="cx">         completionHandler(action, policies, processSwapRequestedByClient, WTFMove(safeBrowsingWarning), isNavigatingToAppBoundDomain);
</span><span class="cx">         m_activeListener = nullptr;
</span><span class="cx">     }, expectSafeBrowsingResult, expectAppBoundDomainResult);
</span></span></pre></div>
<a id="branchessafari61019branchSourceWebKitUIProcessWebFrameProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.h (259694 => 259695)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.h   2020-04-08 00:38:33 UTC (rev 259694)
+++ branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebFrameProxy.h      2020-04-08 00:43:11 UTC (rev 259695)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">     void didSameDocumentNavigation(const URL&); // eg. anchor navigation, session state change.
</span><span class="cx">     void didChangeTitle(const String&);
</span><span class="cx"> 
</span><del>-    WebFramePolicyListenerProxy& setUpPolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&&, NavigatingToAppBoundDomain)>&&, ShouldExpectSafeBrowsingResult, ShouldExpectAppBoundDomainResult);
</del><ins>+    WebFramePolicyListenerProxy& setUpPolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&&, Optional<NavigatingToAppBoundDomain>)>&&, ShouldExpectSafeBrowsingResult, ShouldExpectAppBoundDomainResult);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><span class="cx">     void contentFilterDidBlockLoad(WebCore::ContentFilterUnblockHandler contentFilterUnblockHandler) { m_contentFilterUnblockHandler = WTFMove(contentFilterUnblockHandler); }
</span></span></pre></div>
<a id="branchessafari61019branchSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (259694 => 259695)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebPageProxy.cpp  2020-04-08 00:38:33 UTC (rev 259694)
+++ branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebPageProxy.cpp     2020-04-08 00:43:11 UTC (rev 259695)
</span><span class="lines">@@ -5103,10 +5103,10 @@
</span><span class="cx">     shouldExpectAppBoundDomainResult = ShouldExpectAppBoundDomainResult::Yes;
</span><span class="cx"> #endif
</span><span class="cx">     
</span><del>-    auto listener = makeRef(frame.setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(frame), sender = WTFMove(sender), navigation] (PolicyAction policyAction, API::WebsitePolicies* policies, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, NavigatingToAppBoundDomain isAppBoundDomain) mutable {
</del><ins>+    auto listener = makeRef(frame.setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(frame), sender = WTFMove(sender), navigation] (PolicyAction policyAction, API::WebsitePolicies* policies, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, Optional<NavigatingToAppBoundDomain> isAppBoundDomain) mutable {
</ins><span class="cx"> 
</span><del>-        if (policyAction != PolicyAction::Ignore)
-            setIsNavigatingToAppBoundDomain(frame->isMainFrame(), navigation->currentRequest().url(), isAppBoundDomain);
</del><ins>+        if (policyAction != PolicyAction::Ignore && isAppBoundDomain)
+            setIsNavigatingToAppBoundDomain(frame->isMainFrame(), navigation->currentRequest().url(), *isAppBoundDomain);
</ins><span class="cx"> 
</span><span class="cx">         auto completionHandler = [this, protectedThis = protectedThis.copyRef(), frame = frame.copyRef(), sender = WTFMove(sender), navigation, processSwapRequestedByClient, policies = makeRefPtr(policies)] (PolicyAction policyAction) mutable {
</span><span class="cx">             if (frame->isMainFrame()) {
</span><span class="lines">@@ -5290,7 +5290,7 @@
</span><span class="cx">     MESSAGE_CHECK(m_process, frame);
</span><span class="cx">     MESSAGE_CHECK_URL(m_process, request.url());
</span><span class="cx"> 
</span><del>-    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), identifier, listenerID, frameID] (PolicyAction policyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain) mutable {
</del><ins>+    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), identifier, listenerID, frameID] (PolicyAction policyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain) mutable {
</ins><span class="cx">         // FIXME: Assert the API::WebsitePolicies* is nullptr here once clients of WKFramePolicyListenerUseWithPolicies go away.
</span><span class="cx">         RELEASE_ASSERT(processSwapRequestedByClient == ProcessSwapRequestedByClient::No);
</span><span class="cx">         ASSERT_UNUSED(safeBrowsingWarning, !safeBrowsingWarning);
</span><span class="lines">@@ -5338,7 +5338,7 @@
</span><span class="cx">     MESSAGE_CHECK_URL(process, response.url());
</span><span class="cx">     RefPtr<API::Navigation> navigation = navigationID ? m_navigationState->navigation(navigationID) : nullptr;
</span><span class="cx">     auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), webPageID, frameID, identifier, listenerID, navigation = WTFMove(navigation),
</span><del>-        process = process.copyRef()] (PolicyAction policyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain) mutable {
</del><ins>+        process = process.copyRef()] (PolicyAction policyAction, API::WebsitePolicies*, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain) mutable {
</ins><span class="cx">         // FIXME: Assert the API::WebsitePolicies* is nullptr here once clients of WKFramePolicyListenerUseWithPolicies go away.
</span><span class="cx">         RELEASE_ASSERT(processSwapRequestedByClient == ProcessSwapRequestedByClient::No);
</span><span class="cx">         ASSERT_UNUSED(safeBrowsingWarning, !safeBrowsingWarning);
</span></span></pre></div>
<a id="branchessafari61019branchSourceWebKitUIProcessWebsiteDataCocoaWebsiteDataStoreCocoamm"></a>
<div class="modfile"><h4>Modified: branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (259694 => 259695)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm        2020-04-08 00:38:33 UTC (rev 259694)
+++ branches/safari-610.1.9-branch/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm   2020-04-08 00:43:11 UTC (rev 259695)
</span><span class="lines">@@ -457,12 +457,16 @@
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><span class="cx">     if (shouldTreatURLProtocolAsAppBound(requestURL)) {
</span><del>-        listener.didReceiveAppBoundDomainResult(true);
</del><ins>+        listener.didReceiveAppBoundDomainResult(NavigatingToAppBoundDomain::Yes);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ensureAppBoundDomains([domain = WebCore::RegistrableDomain(requestURL), listener = makeRef(listener)] (auto& domains) mutable {
</span><del>-        listener->didReceiveAppBoundDomainResult(domains.contains(domain));
</del><ins>+        if (domains.isEmpty()) {
+            listener->didReceiveAppBoundDomainResult(WTF::nullopt);
+            return;
+        }
+        listener->didReceiveAppBoundDomainResult(domains.contains(domain) ? NavigatingToAppBoundDomain::Yes : NavigatingToAppBoundDomain::No);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>