Title: [218022] trunk/Source/WebKit2
- Revision
- 218022
- Author
- [email protected]
- Date
- 2017-06-09 15:16:55 -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.
Follow-up fix to r218006, which caused a crash on the bots. We cannot WTFMove() protectedThis
here because the callback gets called several times.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (218021 => 218022)
--- trunk/Source/WebKit2/ChangeLog 2017-06-09 22:09:01 UTC (rev 218021)
+++ trunk/Source/WebKit2/ChangeLog 2017-06-09 22:16:55 UTC (rev 218022)
@@ -1,3 +1,17 @@
+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.
+
+ Follow-up fix to r218006, which caused a crash on the bots. We cannot WTFMove() protectedThis
+ here because the callback gets called several times.
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
+
2017-06-09 Jer Noble <[email protected]>
Crash in -[WKWebView _initializeWithConfiguration:]
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (218021 => 218022)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-06-09 22:09:01 UTC (rev 218021)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-06-09 22:16:55 UTC (rev 218022)
@@ -185,8 +185,8 @@
return;
processStatisticsAndDataRecords();
});
- m_resourceLoadStatisticsStore->setWritePersistentStoreCallback([this, protectedThis = makeRef(*this)]() mutable {
- m_statisticsQueue->dispatch([this, protectedThis = WTFMove(protectedThis)] {
+ m_resourceLoadStatisticsStore->setWritePersistentStoreCallback([this, protectedThis = makeRef(*this)] {
+ m_statisticsQueue->dispatch([this, protectedThis = protectedThis.copyRef()] {
writeStoreToDisk();
});
});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes