Title: [220430] trunk/Source/WebCore
Revision
220430
Author
wilan...@apple.com
Date
2017-08-08 17:03:55 -0700 (Tue, 08 Aug 2017)

Log Message

Resource Load Statistics: Merge of dataRecordsRemoved should use std::max()
https://bugs.webkit.org/show_bug.cgi?id=175348
<rdar://problem/33785695>

Reviewed by Chris Dumez.

No new tests. Online change of a statistic that doesn't affect logic flow.

* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::merge):
    Now uses std::max() instead of addition.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (220429 => 220430)


--- trunk/Source/WebCore/ChangeLog	2017-08-08 23:53:04 UTC (rev 220429)
+++ trunk/Source/WebCore/ChangeLog	2017-08-09 00:03:55 UTC (rev 220430)
@@ -1,3 +1,17 @@
+2017-08-08  John Wilander  <wilan...@apple.com>
+
+        Resource Load Statistics: Merge of dataRecordsRemoved should use std::max()
+        https://bugs.webkit.org/show_bug.cgi?id=175348
+        <rdar://problem/33785695>
+
+        Reviewed by Chris Dumez.
+
+        No new tests. Online change of a statistic that doesn't affect logic flow.
+
+        * loader/ResourceLoadStatistics.cpp:
+        (WebCore::ResourceLoadStatistics::merge):
+            Now uses std::max() instead of addition.
+
 2017-08-08  Brent Fulgham  <bfulg...@apple.com>
 
         Sandbox flags do not support document.domain control

Modified: trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp (220429 => 220430)


--- trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp	2017-08-08 23:53:04 UTC (rev 220429)
+++ trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp	2017-08-09 00:03:55 UTC (rev 220430)
@@ -226,7 +226,7 @@
     
     // Prevalent resource stats
     isPrevalentResource |= other.isPrevalentResource;
-    dataRecordsRemoved += other.dataRecordsRemoved;
+    dataRecordsRemoved = std::max(dataRecordsRemoved, other.dataRecordsRemoved);
     
     // In-memory only
     isMarkedForCookiePartitioning |= other.isMarkedForCookiePartitioning;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to