Storage Access API: The call to ResourceLoadStatisticsMemoryStore::grantStorageAccess...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 23:32:32 +0000 (23:32 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 23:32:32 +0000 (23:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188783
<rdar://problem/43559215>

Reviewed by Alex Christensen.

* UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess):
    Now sends the eTLD+1 for the top frame and sub frame.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp

index fe4f30c..897dd05 100644 (file)
@@ -1,3 +1,15 @@
+2018-08-21  John Wilander  <wilander@apple.com>
+
+        Storage Access API: The call to ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal() should send eTLD+1s, not full host names
+        https://bugs.webkit.org/show_bug.cgi?id=188783
+        <rdar://problem/43559215>
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
+        (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess):
+            Now sends the eTLD+1 for the top frame and sub frame.
+
 2018-08-21  Megan Gardner  <megan_gardner@apple.com>
 
         Use VisiblePosition to calculate selection ranges
index 64f9db7..7f45c76 100644 (file)
@@ -474,7 +474,7 @@ void ResourceLoadStatisticsMemoryStore::grantStorageAccess(String&& subFrameHost
         ASSERT(subFrameStatistic.hadUserInteraction);
         subFrameStatistic.storageAccessUnderTopFrameOrigins.add(topFramePrimaryDomain);
     }
-    grantStorageAccessInternal(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, userWasPromptedNow, WTFMove(completionHandler));
+    grantStorageAccessInternal(WTFMove(subFramePrimaryDomain), WTFMove(topFramePrimaryDomain), frameID, pageID, userWasPromptedNow, WTFMove(completionHandler));
 }
 
 void ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal(String&& subFramePrimaryDomain, String&& topFramePrimaryDomain, std::optional<uint64_t> frameID, uint64_t pageID, bool userWasPromptedNowOrEarlier, CompletionHandler<void(bool)>&& callback)