Title: [218006] trunk/Source/WebKit2
- Revision
- 218006
- Author
- [email protected]
- Date
- 2017-06-09 11:52:08 -0700 (Fri, 09 Jun 2017)
Log Message
Make sure we protect |this| in lambdas in WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver()
https://bugs.webkit.org/show_bug.cgi?id=173174
<rdar://problem/32598919>
Reviewed by Darin Adler.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (218005 => 218006)
--- trunk/Source/WebKit2/ChangeLog 2017-06-09 18:46:16 UTC (rev 218005)
+++ trunk/Source/WebKit2/ChangeLog 2017-06-09 18:52:08 UTC (rev 218006)
@@ -1,5 +1,16 @@
2017-06-09 Chris Dumez <[email protected]>
+ Make sure we protect |this| in lambdas in WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver()
+ https://bugs.webkit.org/show_bug.cgi?id=173174
+ <rdar://problem/32598919>
+
+ Reviewed by Darin Adler.
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
+
+2017-06-09 Chris Dumez <[email protected]>
+
Avoid some ref counting churn in WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=173168
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (218005 => 218006)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-06-09 18:46:16 UTC (rev 218005)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-06-09 18:52:08 UTC (rev 218006)
@@ -180,17 +180,17 @@
ResourceLoadObserver::sharedObserver().setStatisticsStore(m_resourceLoadStatisticsStore.copyRef());
ResourceLoadObserver::sharedObserver().setStatisticsQueue(m_statisticsQueue.copyRef());
- m_resourceLoadStatisticsStore->setNotificationCallback([this] {
+ m_resourceLoadStatisticsStore->setNotificationCallback([this, protectedThis = makeRef(*this)] {
if (m_resourceLoadStatisticsStore->isEmpty())
return;
processStatisticsAndDataRecords();
});
- m_resourceLoadStatisticsStore->setWritePersistentStoreCallback([this]() {
- m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this)] {
+ m_resourceLoadStatisticsStore->setWritePersistentStoreCallback([this, protectedThis = makeRef(*this)]() mutable {
+ m_statisticsQueue->dispatch([this, protectedThis = WTFMove(protectedThis)] {
writeStoreToDisk();
});
});
- m_resourceLoadStatisticsStore->setGrandfatherExistingWebsiteDataCallback([this]() {
+ m_resourceLoadStatisticsStore->setGrandfatherExistingWebsiteDataCallback([this, protectedThis = makeRef(*this)]() {
grandfatherExistingWebsiteData();
});
#if PLATFORM(COCOA)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes