Changeset 245517 in webkit


Ignore:
Timestamp:
May 20, 2019 10:14:33 AM (5 years ago)
Author:
sihui_liu@apple.com
Message:

[ Mac WK2 iOS Sim] Layout Test http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196307
<rdar://problem/49345360>

Reviewed by Alex Christensen.

Source/WebKit:

Delay dumping statistics if there is data being removed.

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::removeDataRecords):

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:

(WebKit::ResourceLoadStatisticsStore::dataRecordsBeingRemoved const):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::dumpResourceLoadStatistics):
(WebKit::WebResourceLoadStatisticsStore::tryDumpResourceLoadStatistics):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:

LayoutTests:

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245509 r245517  
     12019-05-20  Sihui Liu  <sihui_liu@apple.com>
     2
     3        [ Mac WK2 iOS Sim] Layout Test http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=196307
     5        <rdar://problem/49345360>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * platform/ios-simulator-wk2/TestExpectations:
     10        * platform/mac-wk2/TestExpectations:
     11
    1122019-05-19  Brent Fulgham  <bfulgham@apple.com>
    213
  • trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r245402 r245517  
    7070webkit.org/b/162975 http/tests/cache/disk-cache/memory-cache-revalidation-updates-disk-cache.html [ Pass Failure ]
    7171
    72 webkit.org/b/196307 http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html [ Pass Failure ]
    73 
    7472webkit.org/b/196112 imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-bold.html [ Pass ImageOnlyFailure ]
    7573webkit.org/b/196112 imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-double-struck.html [ Pass ImageOnlyFailure ]
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r245427 r245517  
    910910webkit.org/b/194916 fast/mediastream/MediaStream-video-element.html [ Pass Failure ]
    911911
    912 webkit.org/b/196307 http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html [ Pass Failure ]
    913 
    914912webkit.org/b/196376 storage/domstorage/localstorage/private-browsing-affects-storage.html [ Pass Failure ]
    915913
  • trunk/Source/WebKit/ChangeLog

    r245516 r245517  
     12019-05-20  Sihui Liu  <sihui_liu@apple.com>
     2
     3        [ Mac WK2 iOS Sim] Layout Test http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=196307
     5        <rdar://problem/49345360>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Delay dumping statistics if there is data being removed.
     10
     11        * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
     12        (WebKit::ResourceLoadStatisticsStore::removeDataRecords):
     13        * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
     14        (WebKit::ResourceLoadStatisticsStore::dataRecordsBeingRemoved const):
     15        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     16        (WebKit::WebResourceLoadStatisticsStore::dumpResourceLoadStatistics):
     17        (WebKit::WebResourceLoadStatisticsStore::tryDumpResourceLoadStatistics):
     18        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
     19
    1202019-05-20  Ludovico de Nittis  <ludovico.denittis@collabora.com>
    221
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp

    r243222 r245517  
    222222                weakThis->incrementRecordsDeletedCountForDomains(WTFMove(domainsWithDeletedWebsiteData));
    223223                weakThis->setDataRecordsBeingRemoved(false);
     224                weakThis->m_store.tryDumpResourceLoadStatistics();
    224225                completionHandler();
    225226#if !RELEASE_LOG_DISABLED
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h

    r245025 r245517  
    186186    virtual bool isDatabaseStore()const { return false; }
    187187
     188    bool dataRecordsBeingRemoved() const { return m_dataRecordsBeingRemoved; }
     189
    188190protected:
    189191    static unsigned computeImportance(const WebCore::ResourceLoadStatistics&);
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r245025 r245517  
    616616
    617617    postTask([this, completionHandler = WTFMove(completionHandler)]() mutable {
    618         String result = m_statisticsStore ? m_statisticsStore->dumpResourceLoadStatistics() : emptyString();
    619         postTaskReply([result = result.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
    620             completionHandler(result);
    621         });
     618        ASSERT(!m_dumpResourceLoadStatisticsCompletionHandler);
     619        m_dumpResourceLoadStatisticsCompletionHandler = WTFMove(completionHandler);
     620        if (m_statisticsStore && m_statisticsStore->dataRecordsBeingRemoved())
     621            return;
     622        tryDumpResourceLoadStatistics();
     623    });
     624}
     625
     626void WebResourceLoadStatisticsStore::tryDumpResourceLoadStatistics()
     627{
     628    ASSERT(!RunLoop::isMain());
     629
     630    if (!m_dumpResourceLoadStatisticsCompletionHandler)
     631        return;
     632
     633    String result = m_statisticsStore ? m_statisticsStore->dumpResourceLoadStatistics() : emptyString();
     634    postTaskReply([result = result.isolatedCopy(), completionHandler = WTFMove(m_dumpResourceLoadStatisticsCompletionHandler)]() mutable {
     635        completionHandler(result);
    622636    });
    623637}
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h

    r245025 r245517  
    128128    void setVeryPrevalentResource(const RegistrableDomain&, CompletionHandler<void()>&&);
    129129    void dumpResourceLoadStatistics(CompletionHandler<void(String)>&&);
     130    void tryDumpResourceLoadStatistics();
    130131    void isPrevalentResource(const RegistrableDomain&, CompletionHandler<void(bool)>&&);
    131132    void isVeryPrevalentResource(const RegistrableDomain&, CompletionHandler<void(bool)>&&);
     
    206207
    207208    bool m_firstNetworkProcessCreated { false };
     209   
     210    CompletionHandler<void(String)> m_dumpResourceLoadStatisticsCompletionHandler;
    208211};
    209212
Note: See TracChangeset for help on using the changeset viewer.