Solve the confusion around blankURL() and isBlankURL() in URL
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2018 19:20:10 +0000 (19:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2018 19:20:10 +0000 (19:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158988

Patch by Rob Buis <rbuis@igalia.com> on 2018-10-12
Reviewed by Alex Christensen.

Source/WebCore:

The name isBlankURL is not accurate as the function tests the
protocol, not the full URL. Choose protocolIsAbout to align with
exisiting protocolIsData, protocolIsBlob etc.

No tests as no change in functionality.

* WebCore.order:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::loadApplicationManifest):
(WebCore::DocumentLoader::startIconLoading):
* loader/NavigationAction.cpp:
(WebCore::shouldTreatAsSameOriginNavigation):
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::SerializerMarkupAccumulator::appendCustomAttributes):
(WebCore::PageSerializer::serializeFrame):
* page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrame const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource const):
* platform/URL.cpp:
(WebCore::URL::protocolIsAbout const):
(WebCore::URL::isBlankURL const): Deleted.
* platform/URL.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::loadFull):

Source/WebKit:

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setLastSeen):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
(WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.order
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/NavigationAction.cpp
Source/WebCore/loader/PolicyChecker.cpp
Source/WebCore/loader/ResourceLoadObserver.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/page/csp/ContentSecurityPolicyDirectiveList.cpp
Source/WebCore/platform/URL.cpp
Source/WebCore/platform/URL.h
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp

index a2b6286..80e7449 100644 (file)
@@ -1,3 +1,39 @@
+2018-10-12  Rob Buis  <rbuis@igalia.com>
+
+        Solve the confusion around blankURL() and isBlankURL() in URL
+        https://bugs.webkit.org/show_bug.cgi?id=158988
+
+        Reviewed by Alex Christensen.
+
+        The name isBlankURL is not accurate as the function tests the
+        protocol, not the full URL. Choose protocolIsAbout to align with
+        exisiting protocolIsData, protocolIsBlob etc.
+
+        No tests as no change in functionality.
+
+        * WebCore.order:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::loadApplicationManifest):
+        (WebCore::DocumentLoader::startIconLoading):
+        * loader/NavigationAction.cpp:
+        (WebCore::shouldTreatAsSameOriginNavigation):
+        * loader/PolicyChecker.cpp:
+        (WebCore::PolicyChecker::checkNavigationPolicy):
+        * loader/ResourceLoadObserver.cpp:
+        (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
+        * page/PageSerializer.cpp:
+        (WebCore::PageSerializer::SerializerMarkupAccumulator::appendCustomAttributes):
+        (WebCore::PageSerializer::serializeFrame):
+        * page/csp/ContentSecurityPolicyDirectiveList.cpp:
+        (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrame const):
+        (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource const):
+        * platform/URL.cpp:
+        (WebCore::URL::protocolIsAbout const):
+        (WebCore::URL::isBlankURL const): Deleted.
+        * platform/URL.h:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
+
 2018-10-12  Youenn Fablet  <youenn@apple.com>
 
         DOMCache should dereference itself as soon as stopped
index e693276..219747e 100644 (file)
@@ -3213,7 +3213,7 @@ __ZNK7WebCore8Document31displayStringModifiedByEncodingERKN3WTF6StringE
 __ZN7WebCore9DOMWindow16setDefaultStatusERKN3WTF6StringE
 __ZN7WebCore8Document6setURLERKNS_4KURLE
 __ZN7WebCore8Document13updateBaseURLEv
-__ZNK7WebCore4KURL10isBlankURLEv
+__ZNK7WebCore4KURL10protocolIsAboutEv
 __ZN7WebCore8Document17takeDOMWindowFromEPS0_
 __ZN7WebCore9DOMWindow21didSecureTransitionToEPNS_8DocumentE
 __ZN7WebCore26ContextDestructionObserver14observeContextEPNS_22ScriptExecutionContextE
index 66fd6a8..660b10d 100644 (file)
@@ -1219,7 +1219,7 @@ uint64_t DocumentLoader::loadApplicationManifest()
     if (!m_frame->isMainFrame())
         return 0;
 
-    if (document->url().isEmpty() || document->url().isBlankURL())
+    if (document->url().isEmpty() || document->url().protocolIsAbout())
         return 0;
 
     auto head = document->head();
@@ -1913,7 +1913,7 @@ void DocumentLoader::startIconLoading()
     if (!m_frame->isMainFrame())
         return;
 
-    if (document->url().isEmpty() || document->url().isBlankURL())
+    if (document->url().isEmpty() || document->url().protocolIsAbout())
         return;
 
     m_linkIcons = LinkIconCollector { *document }.iconsOfTypes({ LinkIconType::Favicon, LinkIconType::TouchIcon, LinkIconType::TouchPrecomposedIcon });
index b2db006..e6a490b 100644 (file)
@@ -74,7 +74,7 @@ NavigationAction& NavigationAction::operator=(NavigationAction&&) = default;
 
 static bool shouldTreatAsSameOriginNavigation(const Document& document, const URL& url)
 {
-    return url.isBlankURL() || url.protocolIsData() || (url.protocolIsBlob() && document.securityOrigin().canRequest(url));
+    return url.protocolIsAbout() || url.protocolIsData() || (url.protocolIsBlob() && document.securityOrigin().canRequest(url));
 }
 
 static std::optional<NavigationAction::UIEventWithKeyStateData> keyStateDataForFirstEventWithKeyState(Event* event)
index aa1a1f4..63f4398 100644 (file)
@@ -141,7 +141,7 @@ void PolicyChecker::checkNavigationPolicy(ResourceRequest&& request, const Resou
     loader->setLastCheckedRequest(ResourceRequest(request));
 
     // Initial 'about:blank' load needs to happen synchronously so the policy check needs to be synchronous in this case.
-    if (!m_frame.loader().stateMachine().committedFirstRealDocumentLoad() && request.url().isBlankURL() && !substituteData.isValid())
+    if (!m_frame.loader().stateMachine().committedFirstRealDocumentLoad() && request.url().protocolIsAbout() && !substituteData.isValid())
         policyDecisionMode = PolicyDecisionMode::Synchronous;
 
 #if USE(QUICK_LOOK)
index 7bdfc48..a73fcfa 100644 (file)
@@ -163,7 +163,7 @@ void ResourceLoadObserver::logUserInteractionWithReducedTimeResolution(const Doc
         return;
 
     auto& url = document.url();
-    if (url.isBlankURL() || url.isEmpty())
+    if (url.protocolIsAbout() || url.isEmpty())
         return;
 
     auto domain = primaryDomain(url);
index a3b43a0..6711603 100644 (file)
@@ -150,7 +150,7 @@ void PageSerializer::SerializerMarkupAccumulator::appendCustomAttributes(StringB
         return;
 
     URL url = frame->document()->url();
-    if (url.isValid() && !url.isBlankURL())
+    if (url.isValid() && !url.protocolIsAbout())
         return;
 
     // We need to give a fake location to blank frames so they can be referenced by the serialized frame.
@@ -178,7 +178,7 @@ void PageSerializer::serializeFrame(Frame* frame)
 {
     Document* document = frame->document();
     URL url = document->url();
-    if (!url.isValid() || url.isBlankURL()) {
+    if (!url.isValid() || url.protocolIsAbout()) {
         // For blank frames we generate a fake URL so they can be referenced by their containing frame.
         url = urlForBlankFrame(frame);
     }
index 2b7e1bf..ddbd8cd 100644 (file)
@@ -240,7 +240,7 @@ const ContentSecurityPolicyDirective* ContentSecurityPolicyDirectiveList::violat
 
 const ContentSecurityPolicyDirective* ContentSecurityPolicyDirectiveList::violatedDirectiveForFrame(const URL& url, bool didReceiveRedirectResponse) const
 {
-    if (url.isBlankURL())
+    if (url.protocolIsAbout())
         return nullptr;
 
     // We must enforce the frame-src directive (if specified) before enforcing the child-src directive for a nested browsing
@@ -293,7 +293,7 @@ const ContentSecurityPolicyDirective* ContentSecurityPolicyDirectiveList::violat
 
 const ContentSecurityPolicyDirective* ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource(const URL& url, bool didReceiveRedirectResponse, ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone shouldAllowEmptyURLIfSourceListEmpty) const
 {
-    if (url.isBlankURL())
+    if (url.protocolIsAbout())
         return nullptr;
     ContentSecurityPolicySourceListDirective* operativeDirective = this->operativeDirective(m_objectSrc.get());
     if (checkSource(operativeDirective, url, didReceiveRedirectResponse, shouldAllowEmptyURLIfSourceListEmpty))
index bdb4686..f299372 100644 (file)
@@ -865,7 +865,7 @@ const URL& blankURL()
     return staticBlankURL;
 }
 
-bool URL::isBlankURL() const
+bool URL::protocolIsAbout() const
 {
     return protocolIs("about");
 }
index cf0e38a..8a818ba 100644 (file)
@@ -135,9 +135,9 @@ public:
     bool protocolIs(StringView) const;
     bool protocolIsBlob() const { return protocolIs("blob"); }
     bool protocolIsData() const { return protocolIs("data"); }
+    WEBCORE_EXPORT bool protocolIsAbout() const;
     bool protocolIsInHTTPFamily() const;
     WEBCORE_EXPORT bool isLocalFile() const;
-    WEBCORE_EXPORT bool isBlankURL() const;
     bool cannotBeABaseURL() const { return m_cannotBeABaseURL; }
 
     WEBCORE_EXPORT bool isMatchingDomain(const String&) const;
index f0e4cae..11570dd 100644 (file)
@@ -262,7 +262,7 @@ void MediaPlayerPrivateGStreamer::loadFull(const String& urlString, const gchar*
         return;
 
     URL url(URL(), urlString);
-    if (url.isBlankURL())
+    if (url.protocolIsAbout())
         return;
 
     if (!m_pipeline)
index 253b09f..fa1c5bb 100644 (file)
@@ -1,3 +1,33 @@
+2018-10-12  Rob Buis  <rbuis@igalia.com>
+
+        Solve the confusion around blankURL() and isBlankURL() in URL
+        https://bugs.webkit.org/show_bug.cgi?id=158988
+
+        Reviewed by Alex Christensen.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::continueWillSendRequest):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::processForNavigationInternal):
+        * UIProcess/WebResourceLoadStatisticsStore.cpp:
+        (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
+        (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
+        (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
+        (WebKit::WebResourceLoadStatisticsStore::setLastSeen):
+        (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
+        (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
+        (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
+        (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
+        (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
+        (WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
+        (WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
+        (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
+        (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
+        (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
+        (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
+        (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
+        (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
+
 2018-10-12  Youenn Fablet  <youenn@apple.com>
 
         Cache API tests are flaky due to file writing failing from time to time
index d1c6889..ecc047f 100644 (file)
@@ -677,7 +677,7 @@ void NetworkResourceLoader::continueWillSendRequest(ResourceRequest&& newRequest
 
     if (m_networkLoadChecker) {
         // FIXME: We should be doing this check when receiving the redirection and not allow about protocol as per fetch spec.
-        if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().isBlankURL() && m_redirectCount) {
+        if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().protocolIsAbout() && m_redirectCount) {
             didFailLoading(ResourceError { String { }, 0, newRequest.url(), "Redirection to URL with a scheme that is not HTTP(S)"_s, ResourceError::Type::AccessControl });
             return;
         }
index 56ff98d..a72b571 100644 (file)
@@ -2151,7 +2151,7 @@ Ref<WebProcessProxy> WebProcessPool::processForNavigationInternal(WebPageProxy&
             RELEASE_LOG(ProcessSwapping, "Using related page %p's URL as source URL for process swap decision", page.configuration().relatedPage());
         }
 
-        if (!sourceURL.isValid() || !targetURL.isValid() || sourceURL.isEmpty() || sourceURL.isBlankURL() || registrableDomainsAreEqual(sourceURL, targetURL)) {
+        if (!sourceURL.isValid() || !targetURL.isValid() || sourceURL.isEmpty() || sourceURL.protocolIsAbout() || registrableDomainsAreEqual(sourceURL, targetURL)) {
             reason = "Navigation is same-site"_s;
             return page.process();
         }
index 317836b..d581486 100644 (file)
@@ -401,7 +401,7 @@ void WebResourceLoadStatisticsStore::logUserInteraction(const URL& url, Completi
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler();
         return;
     }
@@ -417,7 +417,7 @@ void WebResourceLoadStatisticsStore::clearUserInteraction(const URL& url, Comple
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler();
         return;
     }
@@ -433,7 +433,7 @@ void WebResourceLoadStatisticsStore::hasHadUserInteraction(const URL& url, Compl
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler(false);
         return;
     }
@@ -450,7 +450,7 @@ void WebResourceLoadStatisticsStore::setLastSeen(const URL& url, Seconds seconds
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler();
         return;
     }
@@ -466,7 +466,7 @@ void WebResourceLoadStatisticsStore::setPrevalentResource(const URL& url, Comple
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler();
         return;
     }
@@ -482,7 +482,7 @@ void WebResourceLoadStatisticsStore::setVeryPrevalentResource(const URL& url, Co
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler();
         return;
     }
@@ -510,7 +510,7 @@ void WebResourceLoadStatisticsStore::isPrevalentResource(const URL& url, Complet
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler(false);
         return;
     }
@@ -527,7 +527,7 @@ void WebResourceLoadStatisticsStore::isVeryPrevalentResource(const URL& url, Com
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler(false);
         return;
     }
@@ -580,7 +580,7 @@ void WebResourceLoadStatisticsStore::clearPrevalentResource(const URL& url, Comp
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler();
         return;
     }
@@ -596,7 +596,7 @@ void WebResourceLoadStatisticsStore::setGrandfathered(const URL& url, bool value
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty())
+    if (url.protocolIsAbout() || url.isEmpty())
         return;
 
     postTask([this, primaryDomain = isolatedPrimaryDomain(url), value] {
@@ -609,7 +609,7 @@ void WebResourceLoadStatisticsStore::isGrandfathered(const URL& url, CompletionH
 {
     ASSERT(RunLoop::isMain());
 
-    if (url.isBlankURL() || url.isEmpty()) {
+    if (url.protocolIsAbout() || url.isEmpty()) {
         completionHandler(false);
         return;
     }
@@ -626,7 +626,7 @@ void WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin(const URL& s
 {
     ASSERT(RunLoop::isMain());
 
-    if (subframe.isBlankURL() || subframe.isEmpty() || topFrame.isBlankURL() || topFrame.isEmpty())
+    if (subframe.protocolIsAbout() || subframe.isEmpty() || topFrame.protocolIsAbout() || topFrame.isEmpty())
         return;
 
     postTask([this, primaryTopFrameDomain = isolatedPrimaryDomain(topFrame), primarySubFrameDomain = isolatedPrimaryDomain(subframe)] {
@@ -639,7 +639,7 @@ void WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin(const URL
 {
     ASSERT(RunLoop::isMain());
 
-    if (subresource.isBlankURL() || subresource.isEmpty() || topFrame.isBlankURL() || topFrame.isEmpty())
+    if (subresource.protocolIsAbout() || subresource.isEmpty() || topFrame.protocolIsAbout() || topFrame.isEmpty())
         return;
 
     postTask([this, primaryTopFrameDomain = isolatedPrimaryDomain(topFrame), primarySubresourceDomain = isolatedPrimaryDomain(subresource)] {
@@ -652,7 +652,7 @@ void WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo(const URL& s
 {
     ASSERT(RunLoop::isMain());
 
-    if (subresource.isBlankURL() || subresource.isEmpty() || hostNameRedirectedTo.isBlankURL() || hostNameRedirectedTo.isEmpty())
+    if (subresource.protocolIsAbout() || subresource.isEmpty() || hostNameRedirectedTo.protocolIsAbout() || hostNameRedirectedTo.isEmpty())
         return;
 
     postTask([this, primaryRedirectDomain = isolatedPrimaryDomain(hostNameRedirectedTo), primarySubresourceDomain = isolatedPrimaryDomain(subresource)] {
@@ -665,7 +665,7 @@ void WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom(const URL&
 {
     ASSERT(RunLoop::isMain());
 
-    if (subresource.isBlankURL() || subresource.isEmpty() || hostNameRedirectedFrom.isBlankURL() || hostNameRedirectedFrom.isEmpty())
+    if (subresource.protocolIsAbout() || subresource.isEmpty() || hostNameRedirectedFrom.protocolIsAbout() || hostNameRedirectedFrom.isEmpty())
         return;
     
     postTask([this, primaryRedirectDomain = isolatedPrimaryDomain(hostNameRedirectedFrom), primarySubresourceDomain = isolatedPrimaryDomain(subresource)] {
@@ -678,7 +678,7 @@ void WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo(const URL& topF
 {
     ASSERT(RunLoop::isMain());
 
-    if (topFrameHostName.isBlankURL() || topFrameHostName.isEmpty() || hostNameRedirectedTo.isBlankURL() || hostNameRedirectedTo.isEmpty())
+    if (topFrameHostName.protocolIsAbout() || topFrameHostName.isEmpty() || hostNameRedirectedTo.protocolIsAbout() || hostNameRedirectedTo.isEmpty())
         return;
     
     postTask([this, primaryRedirectDomain = isolatedPrimaryDomain(hostNameRedirectedTo), topFramePrimaryDomain = isolatedPrimaryDomain(topFrameHostName)] {
@@ -691,7 +691,7 @@ void WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom(const URL& to
 {
     ASSERT(RunLoop::isMain());
 
-    if (topFrameHostName.isBlankURL() || topFrameHostName.isEmpty() || hostNameRedirectedFrom.isBlankURL() || hostNameRedirectedFrom.isEmpty())
+    if (topFrameHostName.protocolIsAbout() || topFrameHostName.isEmpty() || hostNameRedirectedFrom.protocolIsAbout() || hostNameRedirectedFrom.isEmpty())
         return;
     
     postTask([this, primaryRedirectDomain = isolatedPrimaryDomain(hostNameRedirectedFrom), topFramePrimaryDomain = isolatedPrimaryDomain(topFrameHostName)] {