Changeset 219236 in webkit
- Timestamp:
- Jul 6, 2017 9:15:09 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r219234 r219236 1 2017-07-06 Chris Dumez <cdumez@apple.com> 2 3 Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver 4 https://bugs.webkit.org/show_bug.cgi?id=174234 5 6 Reviewed by Brent Fulgham. 7 8 Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver. It is 9 always 0 since this member is only initialized later on, in the UIProcess. 10 11 * loader/ResourceLoadObserver.cpp: 12 (WebCore::ResourceLoadObserver::logFrameNavigation): 13 (WebCore::ResourceLoadObserver::logSubresourceLoading): 14 (WebCore::ResourceLoadObserver::logWebSocketLoading): 15 1 16 2017-07-06 Yoav Weiss <yoav@yoav.ws> 2 17 -
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
r219231 r219236 85 85 ASSERT(topFrame.document()); 86 86 ASSERT(topFrame.page()); 87 88 if (frame.isMainFrame()) 89 return; 87 90 88 91 if (!shouldLog(topFrame.page())) … … 110 113 111 114 auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain); 112 113 // Always fire if we have previously removed data records for this domain 114 // FIXME: targetStatistics.dataRecordsRemoved is always 0 in WebCore as it gets populated in the UIProcess. 115 bool shouldCallNotificationCallback = targetStatistics.dataRecordsRemoved > 0; 116 117 if (!frame.isMainFrame()) { 118 auto subframeUnderTopFrameOriginsResult = targetStatistics.subframeUnderTopFrameOrigins.add(mainFramePrimaryDomain); 119 if (subframeUnderTopFrameOriginsResult.isNewEntry) 120 shouldCallNotificationCallback = true; 121 } 122 123 if (shouldCallNotificationCallback) 115 auto subframeUnderTopFrameOriginsResult = targetStatistics.subframeUnderTopFrameOrigins.add(mainFramePrimaryDomain); 116 if (subframeUnderTopFrameOriginsResult.isNewEntry) 124 117 scheduleNotificationIfNeeded(); 125 118 } … … 151 144 152 145 bool shouldCallNotificationCallback = false; 153 154 146 { 155 147 auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain); 156 157 // Always fire if we have previously removed data records for this domain 158 // FIXME: targetStatistics.dataRecordsRemoved is always 0 in WebCore as it gets populated in the UIProcess. 159 shouldCallNotificationCallback = targetStatistics.dataRecordsRemoved > 0; 160 161 auto subresourceUnderTopFrameOriginsResult = targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain); 162 if (subresourceUnderTopFrameOriginsResult.isNewEntry) 148 if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry) 163 149 shouldCallNotificationCallback = true; 164 150 } … … 166 152 if (isRedirect) { 167 153 auto& redirectingOriginStatistics = ensureResourceStatisticsForPrimaryDomain(sourcePrimaryDomain); 168 auto subresourceUniqueRedirectsToResult = redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetPrimaryDomain); 169 if (subresourceUniqueRedirectsToResult.isNewEntry) 154 if (redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetPrimaryDomain).isNewEntry) 170 155 shouldCallNotificationCallback = true; 171 156 } … … 200 185 201 186 auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain); 202 203 // Always fire if we have previously removed data records for this domain 204 // FIXME: targetStatistics.dataRecordsRemoved is always 0 in WebCore as it gets populated in the UIProcess. 205 bool shouldCallNotificationCallback = targetStatistics.dataRecordsRemoved > 0; 206 207 auto subresourceUnderTopFrameOriginsResult = targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain); 208 if (subresourceUnderTopFrameOriginsResult.isNewEntry) 209 shouldCallNotificationCallback = true; 210 211 if (shouldCallNotificationCallback) 187 if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry) 212 188 scheduleNotificationIfNeeded(); 213 189 }
Note: See TracChangeset
for help on using the changeset viewer.