Title: [219337] trunk/Source/WebKit2
- Revision
- 219337
- Author
- [email protected]
- Date
- 2017-07-11 09:51:27 -0700 (Tue, 11 Jul 2017)
Log Message
Unreviewed clean-up after r219323
Simplify algorithm slightly based on a suggestion Chris Dumez made in the review.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::pruneResources): Don't create a second variable to track the pruning operation.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (219336 => 219337)
--- trunk/Source/WebKit2/ChangeLog 2017-07-11 16:48:02 UTC (rev 219336)
+++ trunk/Source/WebKit2/ChangeLog 2017-07-11 16:51:27 UTC (rev 219337)
@@ -1,3 +1,12 @@
+2017-07-11 Brent Fulgham <[email protected]>
+
+ Unreviewed clean-up after r219323
+
+ Simplify algorithm slightly based on a suggestion Chris Dumez made in the review.
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::pruneResources): Don't create a second variable to track the pruning operation.
+
2017-07-11 Alex Christensen <[email protected]>
SharedBuffer::size should return a size_t
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (219336 => 219337)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-11 16:48:02 UTC (rev 219336)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-11 16:51:27 UTC (rev 219337)
@@ -941,13 +941,8 @@
});
}
- unsigned removed = 0;
- for (size_t i = 0, end = std::min(numberOfEntriesToPrune, statisticsToPrune.size()); i != end; ++i) {
+ for (size_t i = 0, end = std::min(numberOfEntriesToPrune, statisticsToPrune.size()); i != end; ++i, --numberOfEntriesToPrune)
statisticsMap.remove(statisticsToPrune[i].topPrivatelyOwnedDomain);
- ++removed;
- }
-
- numberOfEntriesToPrune -= removed;
}
static unsigned computeImportance(const ResourceLoadStatistics& resourceStatistic)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes