Title: [230771] trunk/Source/WebKit
- Revision
- 230771
- Author
- [email protected]
- Date
- 2018-04-18 11:55:59 -0700 (Wed, 18 Apr 2018)
Log Message
Avoid crash if ITP Debug mode is on, but ResourceLoadStatistics are not being used
https://bugs.webkit.org/show_bug.cgi?id=184739
<rdar://problem/39287964>
Reviewed by David Kilzer.
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.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode): Check if the statistics store exists
before calling functions on it.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (230770 => 230771)
--- trunk/Source/WebKit/ChangeLog 2018-04-18 18:42:37 UTC (rev 230770)
+++ trunk/Source/WebKit/ChangeLog 2018-04-18 18:55:59 UTC (rev 230771)
@@ -1,3 +1,22 @@
+2018-04-18 Brent Fulgham <[email protected]>
+
+ Avoid crash if ITP Debug mode is on, but ResourceLoadStatistics are not being used
+ https://bugs.webkit.org/show_bug.cgi?id=184739
+ <rdar://problem/39287964>
+
+ Reviewed by David Kilzer.
+
+ 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.
+
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode): Check if the statistics store exists
+ before calling functions on it.
+
2018-04-18 Paul Knight <[email protected]>
Add -[_WKInputDelegateDelegate willStartInputSession:] for clients that want to configure input session before assisting form node
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (230770 => 230771)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2018-04-18 18:42:37 UTC (rev 230770)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2018-04-18 18:55:59 UTC (rev 230771)
@@ -1435,7 +1435,8 @@
void WebsiteDataStore::setResourceLoadStatisticsDebugMode(bool enabled)
{
m_resourceLoadStatisticsDebugMode = enabled;
- m_resourceLoadStatistics->setResourceLoadStatisticsDebugMode(enabled);
+ if (m_resourceLoadStatistics)
+ m_resourceLoadStatistics->setResourceLoadStatisticsDebugMode(enabled);
}
void WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback(Function<void (const String&)>&& callback)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes