Changeset 218115 in webkit
- Timestamp:
- Jun 12, 2017, 11:49:02 AM (8 years ago)
- Location:
- tags/Safari-604.1.25/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-604.1.25/Source/WebKit2/ChangeLog
r217975 r218115 1 2017-06-12 Matthew Hanson <matthew_hanson@apple.com> 2 3 Cherry-pick r217991. rdar://problem/32594952 4 5 2017-06-09 Chris Dumez <cdumez@apple.com> 6 7 Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData() 8 https://bugs.webkit.org/show_bug.cgi?id=173163 9 10 Reviewed by Brent Fulgham. 11 12 Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData() 13 or it may end up getting destroyed before the lambda executing and crash when calling m_statisticsQueue->dispatch(). 14 15 * UIProcess/WebResourceLoadStatisticsStore.cpp: 16 (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData): 17 1 18 2017-06-09 Daewoong Jang <daewoong.jang@navercorp.com> 2 19 -
tags/Safari-604.1.25/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r217606 r218115 266 266 } 267 267 268 void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, std::function<void(HashSet<String>&&)> completionHandler)268 void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, Function<void(HashSet<String>&&)> completionHandler) 269 269 { 270 270 struct CallbackAggregator : ThreadSafeRefCounted<CallbackAggregator> { 271 explicit CallbackAggregator( std::function<void(HashSet<String>&&)>completionHandler)271 explicit CallbackAggregator(Function<void(HashSet<String>&&)>&& completionHandler) 272 272 : completionHandler(WTFMove(completionHandler)) 273 273 { … … 299 299 300 300 unsigned pendingCallbacks = 0; 301 std::function<void(HashSet<String>&&)> completionHandler;301 Function<void(HashSet<String>&&)> completionHandler; 302 302 HashSet<String> domainsWithDeletedWebsiteData; 303 303 }; -
tags/Safari-604.1.25/Source/WebKit2/UIProcess/WebProcessProxy.h
r217606 r218115 143 143 void deleteWebsiteDataForOrigins(WebCore::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>&, Function<void()> completionHandler); 144 144 static void deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores(OptionSet<WebsiteDataType>, Vector<String>&& topPrivatelyControlledDomains, bool shouldNotifyPages, std::function<void(Vector<String>)> completionHandler); 145 static void topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, std::function<void(HashSet<String>&&)> completionHandler);145 static void topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, Function<void(HashSet<String>&&)> completionHandler); 146 146 static void notifyPageStatisticsAndDataRecordsProcessed(); 147 147 -
tags/Safari-604.1.25/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp
r217606 r218115 216 216 // Switch to the main thread to get the default website data store 217 217 RunLoop::main().dispatch([this, protectedThis = makeRef(*this)] () mutable { 218 WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(dataTypesToRemove, notifyPages, [this ](HashSet<String>&& topPrivatelyControlledDomainsWithWebsiteData) mutable {218 WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(dataTypesToRemove, notifyPages, [this, protectedThis = makeRef(*this)] (HashSet<String>&& topPrivatelyControlledDomainsWithWebsiteData) mutable { 219 219 // But always touch the ResourceLoadStatistics store on the worker queue 220 220 m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), topDomains = CrossThreadCopier<HashSet<String>>::copy(topPrivatelyControlledDomainsWithWebsiteData)] () mutable {
Note:
See TracChangeset
for help on using the changeset viewer.