Title: [219236] trunk/Source/WebCore
- Revision
- 219236
- Author
- cdu...@apple.com
- Date
- 2017-07-06 21:15:09 -0700 (Thu, 06 Jul 2017)
Log Message
Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver
https://bugs.webkit.org/show_bug.cgi?id=174234
Reviewed by Brent Fulgham.
Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver. It is
always 0 since this member is only initialized later on, in the UIProcess.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logFrameNavigation):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (219235 => 219236)
--- trunk/Source/WebCore/ChangeLog 2017-07-07 04:13:35 UTC (rev 219235)
+++ trunk/Source/WebCore/ChangeLog 2017-07-07 04:15:09 UTC (rev 219236)
@@ -1,3 +1,18 @@
+2017-07-06 Chris Dumez <cdu...@apple.com>
+
+ Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver
+ https://bugs.webkit.org/show_bug.cgi?id=174234
+
+ Reviewed by Brent Fulgham.
+
+ Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver. It is
+ always 0 since this member is only initialized later on, in the UIProcess.
+
+ * loader/ResourceLoadObserver.cpp:
+ (WebCore::ResourceLoadObserver::logFrameNavigation):
+ (WebCore::ResourceLoadObserver::logSubresourceLoading):
+ (WebCore::ResourceLoadObserver::logWebSocketLoading):
+
2017-07-06 Yoav Weiss <y...@yoav.ws>
[preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (219235 => 219236)
--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2017-07-07 04:13:35 UTC (rev 219235)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2017-07-07 04:15:09 UTC (rev 219236)
@@ -84,6 +84,9 @@
ASSERT(frame.document());
ASSERT(topFrame.document());
ASSERT(topFrame.page());
+
+ if (frame.isMainFrame())
+ return;
if (!shouldLog(topFrame.page()))
return;
@@ -109,18 +112,8 @@
return;
auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
-
- // Always fire if we have previously removed data records for this domain
- // FIXME: targetStatistics.dataRecordsRemoved is always 0 in WebCore as it gets populated in the UIProcess.
- bool shouldCallNotificationCallback = targetStatistics.dataRecordsRemoved > 0;
-
- if (!frame.isMainFrame()) {
- auto subframeUnderTopFrameOriginsResult = targetStatistics.subframeUnderTopFrameOrigins.add(mainFramePrimaryDomain);
- if (subframeUnderTopFrameOriginsResult.isNewEntry)
- shouldCallNotificationCallback = true;
- }
-
- if (shouldCallNotificationCallback)
+ auto subframeUnderTopFrameOriginsResult = targetStatistics.subframeUnderTopFrameOrigins.add(mainFramePrimaryDomain);
+ if (subframeUnderTopFrameOriginsResult.isNewEntry)
scheduleNotificationIfNeeded();
}
@@ -150,23 +143,15 @@
return;
bool shouldCallNotificationCallback = false;
-
{
auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
-
- // Always fire if we have previously removed data records for this domain
- // FIXME: targetStatistics.dataRecordsRemoved is always 0 in WebCore as it gets populated in the UIProcess.
- shouldCallNotificationCallback = targetStatistics.dataRecordsRemoved > 0;
-
- auto subresourceUnderTopFrameOriginsResult = targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain);
- if (subresourceUnderTopFrameOriginsResult.isNewEntry)
+ if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
shouldCallNotificationCallback = true;
}
if (isRedirect) {
auto& redirectingOriginStatistics = ensureResourceStatisticsForPrimaryDomain(sourcePrimaryDomain);
- auto subresourceUniqueRedirectsToResult = redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetPrimaryDomain);
- if (subresourceUniqueRedirectsToResult.isNewEntry)
+ if (redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetPrimaryDomain).isNewEntry)
shouldCallNotificationCallback = true;
}
@@ -199,16 +184,7 @@
return;
auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
-
- // Always fire if we have previously removed data records for this domain
- // FIXME: targetStatistics.dataRecordsRemoved is always 0 in WebCore as it gets populated in the UIProcess.
- bool shouldCallNotificationCallback = targetStatistics.dataRecordsRemoved > 0;
-
- auto subresourceUnderTopFrameOriginsResult = targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain);
- if (subresourceUnderTopFrameOriginsResult.isNewEntry)
- shouldCallNotificationCallback = true;
-
- if (shouldCallNotificationCallback)
+ if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
scheduleNotificationIfNeeded();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes