Changeset 218115 in webkit


Ignore:
Timestamp:
Jun 12, 2017, 11:49:02 AM (8 years ago)
Author:
matthew_hanson@apple.com
Message:

Cherry-pick r217991. rdar://problem/32594952

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  
     12017-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
    1182017-06-09  Daewoong Jang  <daewoong.jang@navercorp.com>
    219
  • tags/Safari-604.1.25/Source/WebKit2/UIProcess/WebProcessProxy.cpp

    r217606 r218115  
    266266}
    267267
    268 void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, std::function<void(HashSet<String>&&)> completionHandler)
     268void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, Function<void(HashSet<String>&&)> completionHandler)
    269269{
    270270    struct CallbackAggregator : ThreadSafeRefCounted<CallbackAggregator> {
    271         explicit CallbackAggregator(std::function<void(HashSet<String>&&)> completionHandler)
     271        explicit CallbackAggregator(Function<void(HashSet<String>&&)>&& completionHandler)
    272272            : completionHandler(WTFMove(completionHandler))
    273273        {
     
    299299       
    300300        unsigned pendingCallbacks = 0;
    301         std::function<void(HashSet<String>&&)> completionHandler;
     301        Function<void(HashSet<String>&&)> completionHandler;
    302302        HashSet<String> domainsWithDeletedWebsiteData;
    303303    };
  • tags/Safari-604.1.25/Source/WebKit2/UIProcess/WebProcessProxy.h

    r217606 r218115  
    143143    void deleteWebsiteDataForOrigins(WebCore::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>&, Function<void()> completionHandler);
    144144    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);
    146146    static void notifyPageStatisticsAndDataRecordsProcessed();
    147147
  • tags/Safari-604.1.25/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp

    r217606 r218115  
    216216    // Switch to the main thread to get the default website data store
    217217    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 {
    219219            // But always touch the ResourceLoadStatistics store on the worker queue
    220220            m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), topDomains = CrossThreadCopier<HashSet<String>>::copy(topPrivatelyControlledDomainsWithWebsiteData)] () mutable {
Note: See TracChangeset for help on using the changeset viewer.