Title: [218133] branches/safari-604.1.25-branch/Source/WebKit2
Revision
218133
Author
matthew_han...@apple.com
Date
2017-06-12 13:52:22 -0700 (Mon, 12 Jun 2017)

Log Message

Cherry-pick r218006. rdar://problem/32598919

Modified Paths

Diff

Modified: branches/safari-604.1.25-branch/Source/WebKit2/ChangeLog (218132 => 218133)


--- branches/safari-604.1.25-branch/Source/WebKit2/ChangeLog	2017-06-12 20:52:19 UTC (rev 218132)
+++ branches/safari-604.1.25-branch/Source/WebKit2/ChangeLog	2017-06-12 20:52:22 UTC (rev 218133)
@@ -1,5 +1,20 @@
 2017-06-12  Matthew Hanson  <matthew_han...@apple.com>
 
+        Cherry-pick r218006. rdar://problem/32598919
+
+    2017-06-09  Chris Dumez  <cdu...@apple.com>
+
+            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-12  Matthew Hanson  <matthew_han...@apple.com>
+
         Cherry-pick r218002. rdar://problem/32679311
 
     2017-06-09  Chris Dumez  <cdu...@apple.com>

Modified: branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (218132 => 218133)


--- branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp	2017-06-12 20:52:19 UTC (rev 218132)
+++ branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp	2017-06-12 20:52:22 UTC (rev 218133)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to