<!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>[242899] trunk/Source</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/242899">242899</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2019-03-13 12:53:41 -0700 (Wed, 13 Mar 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Drop legacy WebCore::toRegistrableDomain() utility function
https://bugs.webkit.org/show_bug.cgi?id=195637

Reviewed by Geoffrey Garen.

Drop legacy toRegistrableDomain() / registrableDomainAreEqual() utility functions.
Update call sites to use modern RegistrableDomain type instead.

Source/WebCore:

* loader/CrossOriginAccessControl.cpp:
(WebCore::shouldCrossOriginResourcePolicyCancelLoad):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setFirstPartyForCookies):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener):
* platform/RegistrableDomain.h:
(WebCore::registrableDomainsAreEqual):
* platform/network/ResourceRequestBase.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
* platform/network/cocoa/ResourceRequestCocoa.mm:

Source/WebKit:

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderCrossOriginAccessControlcpp">trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformRegistrableDomainh">trunk/Source/WebCore/platform/RegistrableDomain.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBaseh">trunk/Source/WebCore/platform/network/ResourceRequestBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceRequestCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaResourceRequestCocoamm">trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm">trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebProcessPoolcpp">trunk/Source/WebKit/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/ChangeLog      2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2019-03-13  Chris Dumez  <cdumez@apple.com>
+
+        Drop legacy WebCore::toRegistrableDomain() utility function
+        https://bugs.webkit.org/show_bug.cgi?id=195637
+
+        Reviewed by Geoffrey Garen.
+
+        Drop legacy toRegistrableDomain() / registrableDomainAreEqual() utility functions.
+        Update call sites to use modern RegistrableDomain type instead.
+
+        * loader/CrossOriginAccessControl.cpp:
+        (WebCore::shouldCrossOriginResourcePolicyCancelLoad):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::setFirstPartyForCookies):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener):
+        * platform/RegistrableDomain.h:
+        (WebCore::registrableDomainsAreEqual):
+        * platform/network/ResourceRequestBase.h:
+        * platform/network/cf/ResourceRequestCFNet.cpp:
+        * platform/network/cocoa/ResourceRequestCocoa.mm:
+
</ins><span class="cx"> 2019-03-13  Alex Christensen  <achristensen@webkit.org>
</span><span class="cx"> 
</span><span class="cx">         Prevent checked_cf_cast crashes in ResourceResponse::platformCertificateInfo
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp    2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/dom/Document.cpp       2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -3450,7 +3450,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Only prevent cross-site navigations.
</span><span class="cx">     auto* targetDocument = targetFrame.document();
</span><del>-    if (targetDocument && (targetDocument->securityOrigin().canAccess(SecurityOrigin::create(destinationURL)) || registrableDomainsAreEqual(targetDocument->url(), destinationURL)))
</del><ins>+    if (targetDocument && (targetDocument->securityOrigin().canAccess(SecurityOrigin::create(destinationURL)) || areRegistrableDomainsEqual(targetDocument->url(), destinationURL)))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderCrossOriginAccessControlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp 2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp    2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx">         if (origin.isUnique())
</span><span class="cx">             return true;
</span><span class="cx"> #if ENABLE(PUBLIC_SUFFIX_LIST)
</span><del>-        if (!registrableDomainsAreEqual(response.url(), ResourceRequest::partitionName(origin.host())))
</del><ins>+        if (!RegistrableDomain::uncheckedCreateFromHost(origin.host()).matches(response.url()))
</ins><span class="cx">             return true;
</span><span class="cx"> #endif
</span><span class="cx">         if (origin.protocol() == "http" && response.url().protocol() == "https")
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp      2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -1107,9 +1107,9 @@
</span><span class="cx">     for (Frame* frame = &m_frame; frame; frame = frame->tree().traverseNext(&m_frame))
</span><span class="cx">         frame->document()->setFirstPartyForCookies(url);
</span><span class="cx"> 
</span><del>-    String registrableDomain = ResourceRequest::partitionName(url.host().toString());
</del><ins>+    RegistrableDomain registrableDomain(url);
</ins><span class="cx">     for (Frame* frame = &m_frame; frame; frame = frame->tree().traverseNext(&m_frame)) {
</span><del>-        if (SecurityPolicy::shouldInheritSecurityOriginFromOwner(frame->document()->url()) || registrableDomainsAreEqual(frame->document()->url(), registrableDomain))
</del><ins>+        if (SecurityPolicy::shouldInheritSecurityOriginFromOwner(frame->document()->url()) || registrableDomain.matches(frame->document()->url()))
</ins><span class="cx">             frame->document()->setSiteForCookies(url);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -2970,7 +2970,7 @@
</span><span class="cx">         request.setIsSameSite(true);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    request.setIsSameSite(registrableDomainsAreEqual(initiator->siteForCookies(), request.url()));
</del><ins>+    request.setIsSameSite(areRegistrableDomainsEqual(initiator->siteForCookies(), request.url()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameLoader::addHTTPUpgradeInsecureRequestsIfNeeded(ResourceRequest& request)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp  2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/page/DOMWindow.cpp     2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -1944,7 +1944,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: This is a quirk for chase.com on iPad (<rdar://problem/48423023>).
</span><del>-    if (toRegistrableDomain(document()->url()) == "chase.com") {
</del><ins>+    if (RegistrableDomain::uncheckedCreateFromRegistrableDomainString("chase.com"_s).matches(document()->url())) {
</ins><span class="cx">         // Fire a fake DeviceMotionEvent with acceleration data to unblock the site's login flow.
</span><span class="cx">         document()->postTask([](auto& context) {
</span><span class="cx">             if (auto* window = downcast<Document>(context).domWindow()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformRegistrableDomainh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/RegistrableDomain.h (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/RegistrableDomain.h        2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/platform/RegistrableDomain.h   2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -131,6 +131,11 @@
</span><span class="cx">     return registrableDomain;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline bool areRegistrableDomainsEqual(const URL& a, const URL& b)
+{
+    return RegistrableDomain(a).matches(b);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.h (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.h      2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.h 2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> #include "FormData.h"
</span><span class="cx"> #include "HTTPHeaderMap.h"
</span><span class="cx"> #include "IntRect.h"
</span><ins>+#include "ResourceLoadPriority.h"
</ins><span class="cx"> #include <wtf/URL.h>
</span><del>-#include "ResourceLoadPriority.h"
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -258,24 +258,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool equalIgnoringHeaderFields(const ResourceRequestBase&, const ResourceRequestBase&);
</span><span class="cx"> 
</span><del>-// FIXME: Find a better place for these functions.
-inline String toRegistrableDomain(const URL& a)
-{
-    auto host = a.host().toString();
-    auto registrableDomain = ResourceRequestBase::partitionName(host);
-    // Fall back to the host if we cannot determine the registrable domain.
-    return registrableDomain.isEmpty() ? host : registrableDomain;
-}
-
-inline bool registrableDomainsAreEqual(const URL& a, const URL& b)
-{
-    return toRegistrableDomain(a) == toRegistrableDomain(b);
-}
-inline bool registrableDomainsAreEqual(const URL& a, const String& registrableDomain)
-{
-    return toRegistrableDomain(a) == registrableDomain;
-}
-
</del><span class="cx"> inline bool operator==(const ResourceRequest& a, const ResourceRequest& b) { return ResourceRequestBase::equal(a, b); }
</span><span class="cx"> inline bool operator!=(ResourceRequest& a, const ResourceRequest& b) { return !(a == b); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceRequestCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp        2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp   2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include "ResourceRequestCFNet.h"
</span><span class="cx"> 
</span><span class="cx"> #include "HTTPHeaderNames.h"
</span><ins>+#include "RegistrableDomain.h"
</ins><span class="cx"> #include "ResourceRequest.h"
</span><span class="cx"> #include <pal/spi/cf/CFNetworkSPI.h>
</span><span class="cx"> #include <wtf/cf/TypeCastsCF.h>
</span><span class="lines">@@ -286,7 +287,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000
</span><span class="cx">     RetainPtr<CFURLRef> siteForCookies = adoptCF(checked_cf_cast<CFURLRef>(_CFURLRequestCopyProtocolPropertyForKey(m_cfRequest.get(), CFSTR("_kCFHTTPCookiePolicyPropertySiteForCookies"))));
</span><del>-    m_sameSiteDisposition = !siteForCookies ? SameSiteDisposition::Unspecified : (registrableDomainsAreEqual(siteForCookies.get(), m_url) ? SameSiteDisposition::SameSite : SameSiteDisposition::CrossSite);
</del><ins>+    m_sameSiteDisposition = !siteForCookies ? SameSiteDisposition::Unspecified : (areRegistrableDomainsEqual(siteForCookies.get(), m_url) ? SameSiteDisposition::SameSite : SameSiteDisposition::CrossSite);
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr<CFNumberRef> isTopSiteCF = adoptCF(checked_cf_cast<CFNumber>(_CFURLRequestCopyProtocolPropertyForKey(m_cfRequest.get(), CFSTR("_kCFHTTPCookiePolicyPropertyisTopSite"))));
</span><span class="cx">     if (!isTopSiteCF)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaResourceRequestCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm      2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm 2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #import "FormDataStreamMac.h"
</span><span class="cx"> #import "HTTPHeaderNames.h"
</span><ins>+#import "RegistrableDomain.h"
</ins><span class="cx"> #import "ResourceRequestCFNet.h"
</span><span class="cx"> #import "RuntimeApplicationChecks.h"
</span><span class="cx"> #import <Foundation/Foundation.h>
</span><span class="lines">@@ -89,7 +90,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
</span><span class="cx">     URL siteForCookies { [m_nsRequest.get() _propertyForKey:@"_kCFHTTPCookiePolicyPropertySiteForCookies"] };
</span><del>-    m_sameSiteDisposition = siteForCookies.isNull() ? SameSiteDisposition::Unspecified : (registrableDomainsAreEqual(siteForCookies, m_url) ? SameSiteDisposition::SameSite : SameSiteDisposition::CrossSite);
</del><ins>+    m_sameSiteDisposition = siteForCookies.isNull() ? SameSiteDisposition::Unspecified : (areRegistrableDomainsEqual(siteForCookies, m_url) ? SameSiteDisposition::SameSite : SameSiteDisposition::CrossSite);
</ins><span class="cx"> 
</span><span class="cx">     m_isTopSite = static_cast<NSNumber*>([m_nsRequest.get() _propertyForKey:@"_kCFHTTPCookiePolicyPropertyIsTopLevelNavigation"]).boolValue;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebKit/ChangeLog       2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2019-03-13  Chris Dumez  <cdumez@apple.com>
+
+        Drop legacy WebCore::toRegistrableDomain() utility function
+        https://bugs.webkit.org/show_bug.cgi?id=195637
+
+        Reviewed by Geoffrey Garen.
+
+        Drop legacy toRegistrableDomain() / registrableDomainAreEqual() utility functions.
+        Update call sites to use modern RegistrableDomain type instead.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::processForNavigationInternal):
+
</ins><span class="cx"> 2019-03-12  Brady Eidson  <beidson@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Take UnboundedNetworking assertion when a file upload is in progress.
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm    2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool NetworkDataTaskCocoa::isThirdPartyRequest(const WebCore::ResourceRequest& request)
</span><span class="cx"> {
</span><del>-    return !WebCore::registrableDomainsAreEqual(request.url(), request.firstPartyForCookies());
</del><ins>+    return !WebCore::areRegistrableDomainsEqual(request.url(), request.firstPartyForCookies());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void updateTaskWithFirstPartyForSameSiteCookies(NSURLSessionDataTask* task, const WebCore::ResourceRequest& request)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp    2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -1313,7 +1313,7 @@
</span><span class="cx">         if (initiatingPage) {
</span><span class="cx">             URL initiatingPageURL = URL { URL { }, initiatingPage->pageLoadState().url() };
</span><span class="cx">             updatedRequest.setFirstPartyForCookies(initiatingPageURL);
</span><del>-            updatedRequest.setIsSameSite(registrableDomainsAreEqual(initiatingPageURL, request.url()));
</del><ins>+            updatedRequest.setIsSameSite(areRegistrableDomainsEqual(initiatingPageURL, request.url()));
</ins><span class="cx">             if (!updatedRequest.hasHTTPHeaderField(HTTPHeaderName::UserAgent))
</span><span class="cx">                 updatedRequest.setHTTPUserAgent(initiatingPage->userAgent());
</span><span class="cx">         } else {
</span><span class="lines">@@ -2212,14 +2212,14 @@
</span><span class="cx"> void WebProcessPool::processForNavigationInternal(WebPageProxy& page, const API::Navigation& navigation, Ref<WebProcessProxy>&& sourceProcess, const URL& pageSourceURL, ProcessSwapRequestedByClient processSwapRequestedByClient, Ref<WebsiteDataStore>&& dataStore, CompletionHandler<void(Ref<WebProcessProxy>&&, SuspendedPageProxy*, const String&)>&& completionHandler)
</span><span class="cx"> {
</span><span class="cx">     auto& targetURL = navigation.currentRequest().url();
</span><del>-    auto registrableDomain = WebCore::RegistrableDomain { targetURL };
</del><ins>+    auto targetRegistrableDomain = WebCore::RegistrableDomain { targetURL };
</ins><span class="cx"> 
</span><del>-    auto createNewProcess = [this, protectedThis = makeRef(*this), page = makeRef(page), targetURL, registrableDomain, dataStore = dataStore.copyRef()] () -> Ref<WebProcessProxy> {
-        if (auto process = webProcessCache().takeProcess(registrableDomain, dataStore))
</del><ins>+    auto createNewProcess = [this, protectedThis = makeRef(*this), page = makeRef(page), targetURL, targetRegistrableDomain, dataStore = dataStore.copyRef()] () -> Ref<WebProcessProxy> {
+        if (auto process = webProcessCache().takeProcess(targetRegistrableDomain, dataStore))
</ins><span class="cx">             return process.releaseNonNull();
</span><span class="cx"> 
</span><span class="cx">         // Check if we have a suspended page for the given registrable domain and use its process if we do, for performance reasons.
</span><del>-        if (auto process = findReusableSuspendedPageProcess(registrableDomain, page, dataStore)) {
</del><ins>+        if (auto process = findReusableSuspendedPageProcess(targetRegistrableDomain, page, dataStore)) {
</ins><span class="cx">             RELEASE_LOG(ProcessSwapping, "Using WebProcess %i from a SuspendedPage", process->processIdentifier());
</span><span class="cx">             return process.releaseNonNull();
</span><span class="cx">         }
</span><span class="lines">@@ -2300,15 +2300,15 @@
</span><span class="cx">         RELEASE_LOG(ProcessSwapping, "Using related page %p's URL as source URL for process swap decision", page.configuration().relatedPage());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!sourceURL.isValid() || !targetURL.isValid() || sourceURL.isEmpty() || sourceURL.protocolIsAbout() || registrableDomainsAreEqual(sourceURL, targetURL))
</del><ins>+    if (!sourceURL.isValid() || !targetURL.isValid() || sourceURL.isEmpty() || sourceURL.protocolIsAbout() || targetRegistrableDomain.matches(sourceURL))
</ins><span class="cx">         return completionHandler(WTFMove(sourceProcess), nullptr, "Navigation is same-site"_s);
</span><span class="cx"> 
</span><span class="cx">     String reason = "Navigation is cross-site"_s;
</span><span class="cx">     
</span><span class="cx">     if (m_configuration->alwaysKeepAndReuseSwappedProcesses()) {
</span><del>-        LOG(ProcessSwapping, "(ProcessSwapping) Considering re-use of a previously cached process for domain %s", registrableDomain.string().utf8().data());
</del><ins>+        LOG(ProcessSwapping, "(ProcessSwapping) Considering re-use of a previously cached process for domain %s", targetRegistrableDomain.string().utf8().data());
</ins><span class="cx"> 
</span><del>-        if (auto* process = m_swappedProcessesPerRegistrableDomain.get(registrableDomain)) {
</del><ins>+        if (auto* process = m_swappedProcessesPerRegistrableDomain.get(targetRegistrableDomain)) {
</ins><span class="cx">             if (&process->websiteDataStore() == dataStore.ptr()) {
</span><span class="cx">                 LOG(ProcessSwapping, "(ProcessSwapping) Reusing a previously cached process with pid %i to continue navigation to URL %s", process->processIdentifier(), targetURL.string().utf8().data());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (242898 => 242899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp   2019-03-13 19:28:26 UTC (rev 242898)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp      2019-03-13 19:53:41 UTC (rev 242899)
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (m_hasFrameSpecificStorageAccess && !WebCore::registrableDomainsAreEqual(currentUrl, newUrl)) {
</del><ins>+    if (m_hasFrameSpecificStorageAccess && !WebCore::areRegistrableDomainsEqual(currentUrl, newUrl)) {
</ins><span class="cx">         WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RemoveStorageAccessForFrame(sessionID(), frameID().value(), pageID().value()), 0);
</span><span class="cx">         m_hasFrameSpecificStorageAccess = false;
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>