Skip debug assertion in ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsTh...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Sep 2018 01:36:27 +0000 (01:36 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Sep 2018 01:36:27 +0000 (01:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190097
<rdar://problem/44877080>

Reviewed by Chris Dumez.

The change in https://bugs.webkit.org/show_bug.cgi?id=190055 causes a
re-classification that may trigger a debug assertion in
ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain().
We should skip the assertion for statistics model version 14 to avoid
this.

* UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain const):

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

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

index daaf279..8c87d1a 100644 (file)
@@ -1,3 +1,20 @@
+2018-09-28  John Wilander  <wilander@apple.com>
+
+        Skip debug assertion in ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain()
+        https://bugs.webkit.org/show_bug.cgi?id=190097
+        <rdar://problem/44877080>
+
+        Reviewed by Chris Dumez.
+
+        The change in https://bugs.webkit.org/show_bug.cgi?id=190055 causes a
+        re-classification that may trigger a debug assertion in
+        ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain().
+        We should skip the assertion for statistics model version 14 to avoid
+        this.
+
+        * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
+        (WebKit::ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain const):
+
 2018-09-28  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: crash in InspectorNetworkAgent::didReceiveResponse when loading denied x-frame resources
index 39c2e41..7d17afe 100644 (file)
@@ -270,8 +270,10 @@ unsigned ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedi
     ASSERT(!RunLoop::isMain());
 
     if (numberOfRecursiveCalls >= maxNumberOfRecursiveCallsInRedirectTraceBack) {
-        ASSERT_NOT_REACHED();
-        WTFLogAlways("Hit %u recursive calls in redirect backtrace. Returning early.", maxNumberOfRecursiveCallsInRedirectTraceBack);
+        // Model version 14 invokes a deliberate re-classification of the whole set.
+        if (statisticsModelVersion != 14)
+            ASSERT_NOT_REACHED();
+        RELEASE_LOG(ResourceLoadStatistics, "Hit %u recursive calls in redirect backtrace. Returning early.", maxNumberOfRecursiveCallsInRedirectTraceBack);
         return numberOfRecursiveCalls;
     }