Bug 184739 - Avoid crash if ITP Debug mode is on, but ResourceLoadStatistics are not being used
Summary: Avoid crash if ITP Debug mode is on, but ResourceLoadStatistics are not being...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-18 11:04 PDT by Brent Fulgham
Modified: 2018-04-18 11:56 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.07 KB, patch)
2018-04-18 11:07 PDT, Brent Fulgham
ddkilzer: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2018-04-18 11:04:29 PDT
If a user has the ResourceLoadStatistics logic turned off, but has the ITP Debug experimental flag turned on, you can cause a crash.

This is because the WebsiteDataStore for the process doesn't bother creating a ResourceLoadStatisticsStore if the statistics machinery is not running. The ITP debug flag was being blindly set without checking if the statistics store exists or not, which can cause a crash.
Comment 1 Brent Fulgham 2018-04-18 11:07:11 PDT
<rdar://problem/39287964>
Comment 2 Brent Fulgham 2018-04-18 11:07:44 PDT
Created attachment 338228 [details]
Patch
Comment 3 John Wilander 2018-04-18 11:09:19 PDT
Looks good to me.
Comment 4 David Kilzer (:ddkilzer) 2018-04-18 11:29:01 PDT
Comment on attachment 338228 [details]
Patch

r=me
Comment 5 Brent Fulgham 2018-04-18 11:56:02 PDT
Committed r230771: <https://trac.webkit.org/changeset/230771>