[webkit-reviews] review denied: [Bug 174215] Resource Load Statistics: Prune statistics in order of importance : [Attachment 314776] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 10 13:04:14 PDT 2017
Chris Dumez <cdumez at apple.com> has denied John Wilander <wilander at apple.com>'s
request for review:
Bug 174215: Resource Load Statistics: Prune statistics in order of importance
https://bugs.webkit.org/show_bug.cgi?id=174215
Attachment 314776: Patch
https://bugs.webkit.org/attachment.cgi?id=314776&action=review
--- Comment #14 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 314776
--> https://bugs.webkit.org/attachment.cgi?id=314776
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=314776&action=review
>>> Source/WebKit2/UIProcess/Storage/ResourceLoadStatisticsStore.cpp:454
>>> + size_t numberOfEntriesLeftToPrune = m_resourceStatisticsMap.size() -
pruneEntriesDownTo;
>>
>> If this is 0, we're in trouble, based on your implementation of
sortAndPrune()
>
> We only hit this if m_resourceStatisticsMap.size() > the max count, and the
pruning target count should always be less than the overall max (by default, by
around 200 or so). I don't think we can hit this, but I'll add an assert.
>
> Would you prefer a test and early return?
??
The check 3 lines above is:
if (m_resourceStatisticsMap.size() < maxStatisticsEntries)
return;
So if m_resourceStatisticsMap.size() == maxStatisticsEntries then you can end
up with 0 here, no?
More information about the webkit-reviews
mailing list