Changeset 240346 in webkit
- Timestamp:
- Jan 23, 2019 10:44:34 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r240343 r240346 1 2019-01-23 Brent Fulgham <bfulgham@apple.com> 2 3 REGRESSION (r240243): CrashTracer: WebKitTestRunnerApp at com.apple.WebKit: WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const + 32 4 https://bugs.webkit.org/show_bug.cgi?id=193723 5 <rdar://problem/47476802> 6 7 Reviewed by David Kilzer. 8 9 The new code added in r240243 could attempt to submit telemetry after the relevant 10 WebResourceLoadStatisticsStore was destroyed. We should guard against this possibility. 11 12 * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp: 13 (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit): 14 1 15 2019-01-23 Antti Koivisto <antti@apple.com> 2 16 -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp
r240243 r240346 242 242 243 243 // Dispatch on the main thread to make sure the WebPageProxy we're using doesn't go away. 244 RunLoop::main().dispatch([sortedPrevalentResources = WTFMove(sortedPrevalentResources), sortedPrevalentResourcesWithoutUserInteraction = WTFMove(sortedPrevalentResourcesWithoutUserInteraction), prevalentResourcesDaysSinceUserInteraction = WTFMove(prevalentResourcesDaysSinceUserInteraction), &resourceLoadStatisticsStore] () { 244 RunLoop::main().dispatch([sortedPrevalentResources = WTFMove(sortedPrevalentResources), sortedPrevalentResourcesWithoutUserInteraction = WTFMove(sortedPrevalentResourcesWithoutUserInteraction), prevalentResourcesDaysSinceUserInteraction = WTFMove(prevalentResourcesDaysSinceUserInteraction), resourceLoadStatisticsStore = makeWeakPtr(resourceLoadStatisticsStore)] () { 245 if (!resourceLoadStatisticsStore) 246 return; 247 245 248 auto webPageProxy = WebPageProxy::nonEphemeralWebPageProxy(); 246 249 if (!webPageProxy) { 247 250 if (notifyPagesWhenTelemetryWasCaptured) 248 notifyPages(0, 0, 0, resourceLoadStatisticsStore .store());251 notifyPages(0, 0, 0, resourceLoadStatisticsStore->store()); 249 252 return; 250 253 } 251 254 252 255 if (notifyPagesWhenTelemetryWasCaptured) { 253 notifyPages(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, prevalentResourcesDaysSinceUserInteraction.size(), resourceLoadStatisticsStore .store());256 notifyPages(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, prevalentResourcesDaysSinceUserInteraction.size(), resourceLoadStatisticsStore->store()); 254 257 // The notify pages function is for testing so we don't need to do an actual submission. 255 258 return; … … 264 267 webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), "medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"_s, median(prevalentResourcesDaysSinceUserInteraction), significantFiguresForLoggedValues, ShouldSample::No); 265 268 266 submitTopLists(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, resourceLoadStatisticsStore .store());269 submitTopLists(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, resourceLoadStatisticsStore->store()); 267 270 }); 268 271 }
Note: See TracChangeset
for help on using the changeset viewer.