Title: [218131] branches/safari-604.1.25-branch/Source/WebKit2
- Revision
- 218131
- Author
- matthew_han...@apple.com
- Date
- 2017-06-12 13:52:16 -0700 (Mon, 12 Jun 2017)
Log Message
Cherry-pick r217991. rdar://problem/32594952
Modified Paths
Diff
Modified: branches/safari-604.1.25-branch/Source/WebKit2/ChangeLog (218130 => 218131)
--- branches/safari-604.1.25-branch/Source/WebKit2/ChangeLog 2017-06-12 20:52:12 UTC (rev 218130)
+++ branches/safari-604.1.25-branch/Source/WebKit2/ChangeLog 2017-06-12 20:52:16 UTC (rev 218131)
@@ -1,3 +1,20 @@
+2017-06-12 Matthew Hanson <matthew_han...@apple.com>
+
+ Cherry-pick r217991. rdar://problem/32594952
+
+ 2017-06-09 Chris Dumez <cdu...@apple.com>
+
+ Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
+ https://bugs.webkit.org/show_bug.cgi?id=173163
+
+ Reviewed by Brent Fulgham.
+
+ Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
+ or it may end up getting destroyed before the lambda executing and crash when calling m_statisticsQueue->dispatch().
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
+
2017-06-08 Dean Jackson <d...@apple.com>
Disable some features on this release branch.
Modified: branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp (218130 => 218131)
--- branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2017-06-12 20:52:12 UTC (rev 218130)
+++ branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2017-06-12 20:52:16 UTC (rev 218131)
@@ -265,10 +265,10 @@
}
}
-void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, std::function<void(HashSet<String>&&)> completionHandler)
+void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, Function<void(HashSet<String>&&)> completionHandler)
{
struct CallbackAggregator : ThreadSafeRefCounted<CallbackAggregator> {
- explicit CallbackAggregator(std::function<void(HashSet<String>&&)> completionHandler)
+ explicit CallbackAggregator(Function<void(HashSet<String>&&)>&& completionHandler)
: completionHandler(WTFMove(completionHandler))
{
}
@@ -298,7 +298,7 @@
}
unsigned pendingCallbacks = 0;
- std::function<void(HashSet<String>&&)> completionHandler;
+ Function<void(HashSet<String>&&)> completionHandler;
HashSet<String> domainsWithDeletedWebsiteData;
};
Modified: branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebProcessProxy.h (218130 => 218131)
--- branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebProcessProxy.h 2017-06-12 20:52:12 UTC (rev 218130)
+++ branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebProcessProxy.h 2017-06-12 20:52:16 UTC (rev 218131)
@@ -142,7 +142,7 @@
void deleteWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, std::chrono::system_clock::time_point modifiedSince, Function<void()> completionHandler);
void deleteWebsiteDataForOrigins(WebCore::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>&, Function<void()> completionHandler);
static void deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores(OptionSet<WebsiteDataType>, Vector<String>&& topPrivatelyControlledDomains, bool shouldNotifyPages, std::function<void(Vector<String>)> completionHandler);
- static void topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, std::function<void(HashSet<String>&&)> completionHandler);
+ static void topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, Function<void(HashSet<String>&&)> completionHandler);
static void notifyPageStatisticsAndDataRecordsProcessed();
void enableSuddenTermination();
Modified: branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (218130 => 218131)
--- branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-06-12 20:52:12 UTC (rev 218130)
+++ branches/safari-604.1.25-branch/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-06-12 20:52:16 UTC (rev 218131)
@@ -215,7 +215,7 @@
// Switch to the main thread to get the default website data store
RunLoop::main().dispatch([this, protectedThis = makeRef(*this)] () mutable {
- WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(dataTypesToRemove, notifyPages, [this](HashSet<String>&& topPrivatelyControlledDomainsWithWebsiteData) mutable {
+ WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(dataTypesToRemove, notifyPages, [this, protectedThis = makeRef(*this)] (HashSet<String>&& topPrivatelyControlledDomainsWithWebsiteData) mutable {
// But always touch the ResourceLoadStatistics store on the worker queue
m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), topDomains = CrossThreadCopier<HashSet<String>>::copy(topPrivatelyControlledDomainsWithWebsiteData)] () mutable {
this->coreStore().handleFreshStartWithEmptyOrNoStore(WTFMove(topDomains));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes