Changeset 240453 in webkit


Ignore:
Timestamp:
Jan 24, 2019 3:41:30 PM (5 years ago)
Author:
Truitt Savell
Message:

Unreviewed, rolling out r240446.

Casued 5 API failures

Reverted changeset:

"Activate the WebResourceLoadStatisticsStore in the
NetworkProcess and deactivate it in the UIProcess."
https://bugs.webkit.org/show_bug.cgi?id=193297
https://trac.webkit.org/changeset/240446

Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r240452 r240453  
     12019-01-24  Truitt Savell  <tsavell@apple.com>
     2
     3        Unreviewed, rolling out r240446.
     4
     5        Casued 5 API failures
     6
     7        Reverted changeset:
     8
     9        "Activate the WebResourceLoadStatisticsStore in the
     10        NetworkProcess and deactivate it in the UIProcess."
     11        https://bugs.webkit.org/show_bug.cgi?id=193297
     12        https://trac.webkit.org/changeset/240446
     13
    1142019-01-24  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/Source/WebCore/Modules/websockets/WebSocket.cpp

    r240446 r240453  
    280280    }
    281281
    282     RunLoop::main().dispatch([targetURL = m_url.isolatedCopy(), mainFrameURL = context.url().isolatedCopy(), sessionID = context.sessionID()]() {
    283         ResourceLoadObserver::shared().logWebSocketLoading(targetURL, mainFrameURL, sessionID);
     282    RunLoop::main().dispatch([targetURL = m_url.isolatedCopy(), mainFrameURL = context.url().isolatedCopy(), usesEphemeralSession = context.sessionID().isEphemeral()]() {
     283        ResourceLoadObserver::shared().logWebSocketLoading(targetURL, mainFrameURL, usesEphemeralSession);
    284284    });
    285285
  • trunk/Source/WebCore/loader/ResourceLoadObserver.cpp

    r240446 r240453  
    11/*
    2  * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    7676}
    7777
    78 void ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&& callback)
    79 {
    80     ASSERT(!m_logWebSocketLoadingNotificationCallback);
    81     m_logWebSocketLoadingNotificationCallback = WTFMove(callback);
    82 }
    83 
    84 void ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&& callback)
    85 {
    86     ASSERT(!m_logSubresourceLoadingNotificationCallback);
    87     m_logSubresourceLoadingNotificationCallback = WTFMove(callback);
    88 }
    89 
    90 void ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&)>&& callback)
    91 {
    92     ASSERT(!m_logSubresourceRedirectNotificationCallback);
    93     m_logSubresourceRedirectNotificationCallback = WTFMove(callback);
    94 }
    95    
    9678ResourceLoadObserver::ResourceLoadObserver()
    9779    : m_notificationTimer(*this, &ResourceLoadObserver::notifyObserver)
     
    141123    {
    142124        auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
    143         auto lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
    144         targetStatistics.lastSeen = lastSeen;
     125        targetStatistics.lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
    145126        if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
    146127            shouldCallNotificationCallback = true;
    147 
    148         m_logSubresourceLoadingNotificationCallback(page->sessionID(), targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
    149128    }
    150129
     
    157136        if (isNewRedirectToEntry || isNewRedirectFromEntry)
    158137            shouldCallNotificationCallback = true;
    159 
    160         m_logSubresourceRedirectNotificationCallback(page->sessionID(), sourcePrimaryDomain, targetPrimaryDomain);
    161138    }
    162139
     
    165142}
    166143
    167 void ResourceLoadObserver::logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, PAL::SessionID sessionID)
    168 {
    169     if (!shouldLog(sessionID.isEphemeral()))
     144void ResourceLoadObserver::logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, bool usesEphemeralSession)
     145{
     146    if (!shouldLog(usesEphemeralSession))
    170147        return;
    171148
     
    182159        return;
    183160
    184     auto lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
    185 
    186161    auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
    187     targetStatistics.lastSeen = lastSeen;
     162    targetStatistics.lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
    188163    if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
    189164        scheduleNotificationIfNeeded();
    190 
    191     m_logWebSocketLoadingNotificationCallback(sessionID, targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
    192165}
    193166
     
    225198    }
    226199
    227     m_logUserInteractionNotificationCallback(document.sessionID(), domain);
     200    // FIXME(193297): Uncomment this line when ResourceLoadStatistics are no longer gathered in the UI Process.
     201    // m_logUserInteractionNotificationCallback(document.sessionID(), domain);
    228202#endif
    229203
  • trunk/Source/WebCore/loader/ResourceLoadObserver.h

    r240446 r240453  
    11/*
    2  * Copyright (C) 2016-2019 Apple Inc.  All rights reserved.
     2 * Copyright (C) 2016-2017 Apple Inc.  All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    6161
    6262    void logSubresourceLoading(const Frame*, const ResourceRequest& newRequest, const ResourceResponse& redirectResponse);
    63     void logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, PAL::SessionID);
     63    void logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, bool usesEphemeralSession);
    6464    void logUserInteractionWithReducedTimeResolution(const Document&);
    6565   
     
    7575    WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(const String&, uint64_t, const String&)>&&);
    7676    WEBCORE_EXPORT void setLogUserInteractionNotificationCallback(WTF::Function<void(PAL::SessionID, const String&)>&&);
    77     WEBCORE_EXPORT void setLogWebSocketLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&&);
    78     WEBCORE_EXPORT void setLogSubresourceLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&&);
    79     WEBCORE_EXPORT void setLogSubresourceRedirectNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&)>&&);
    8077
    8178    WEBCORE_EXPORT void notifyObserver();
     
    10299    HashMap<String, ResourceLoadStatistics> m_resourceStatisticsMap;
    103100    HashMap<String, WTF::WallTime> m_lastReportedUserInteractionMap;
    104     Function<void(Vector<ResourceLoadStatistics>&&)> m_notificationCallback;
    105     Function<void(const String&, uint64_t, const String&)> m_requestStorageAccessUnderOpenerCallback;
    106     Function<void(PAL::SessionID, const String&)> m_logUserInteractionNotificationCallback;
    107     Function<void(PAL::SessionID, const String&, const String&, WallTime)> m_logWebSocketLoadingNotificationCallback;
    108     Function<void(PAL::SessionID, const String&, const String&, WallTime)> m_logSubresourceLoadingNotificationCallback;
    109     Function<void(PAL::SessionID, const String&, const String&)> m_logSubresourceRedirectNotificationCallback;
    110 
     101    WTF::Function<void (Vector<ResourceLoadStatistics>&&)> m_notificationCallback;
     102    WTF::Function<void(const String&, uint64_t, const String&)> m_requestStorageAccessUnderOpenerCallback;
     103    WTF::Function<void(PAL::SessionID, const String&)> m_logUserInteractionNotificationCallback;
    111104    Timer m_notificationTimer;
    112105#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
  • trunk/Source/WebKit/ChangeLog

    r240446 r240453  
     12019-01-24  Truitt Savell  <tsavell@apple.com>
     2
     3        Unreviewed, rolling out r240446.
     4
     5        Casued 5 API failures
     6
     7        Reverted changeset:
     8
     9        "Activate the WebResourceLoadStatisticsStore in the
     10        NetworkProcess and deactivate it in the UIProcess."
     11        https://bugs.webkit.org/show_bug.cgi?id=193297
     12        https://trac.webkit.org/changeset/240446
     13
    1142019-01-24  Brent Fulgham  <bfulgham@apple.com>
    215
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp

    r240446 r240453  
    639639}
    640640
    641 void ResourceLoadStatisticsMemoryStore::logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
    642 {
    643     auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
    644     targetStatistics.lastSeen = lastSeen;
    645     if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
    646         scheduleStatisticsProcessingRequestIfNecessary();
    647 }
    648 
    649 void ResourceLoadStatisticsMemoryStore::logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
    650 {
    651     auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
    652     targetStatistics.lastSeen = lastSeen;
    653     if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
    654         scheduleStatisticsProcessingRequestIfNecessary();
    655 }
    656 
    657 void ResourceLoadStatisticsMemoryStore::logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain)
    658 {
    659     auto& redirectingOriginStatistics = ensureResourceStatisticsForPrimaryDomain(sourcePrimaryDomain);
    660     bool isNewRedirectToEntry = redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetPrimaryDomain).isNewEntry;
    661     auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
    662     bool isNewRedirectFromEntry = targetStatistics.subresourceUniqueRedirectsFrom.add(sourcePrimaryDomain).isNewEntry;
    663    
    664     if (isNewRedirectToEntry || isNewRedirectFromEntry)
    665         scheduleStatisticsProcessingRequestIfNecessary();
    666 }
    667 
    668641void ResourceLoadStatisticsMemoryStore::logUserInteraction(const String& primaryDomain)
    669642{
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h

    r240446 r240453  
    125125    void logFrameNavigation(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, const String& sourcePrimaryDomain, const String& targetHost, const String& mainFrameHost, bool isRedirect, bool isMainFrame);
    126126    void logUserInteraction(const String& primaryDomain);
    127     void logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
    128     void logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
    129     void logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain);
    130127
    131128    void clearUserInteraction(const String& primaryDomain);
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r240446 r240453  
    418418}
    419419
     420void WebResourceLoadStatisticsStore::removeAllStorageAccess()
     421{
     422    if (m_networkSession)
     423        m_networkSession->networkStorageSession().removeAllStorageAccess();
     424}
     425
    420426void WebResourceLoadStatisticsStore::removeAllStorageAccess(CompletionHandler<void()>&& completionHandler)
    421427{
     
    426432        return;
    427433    }
    428 
    429     if (m_networkSession)
    430         m_networkSession->networkStorageSession().removeAllStorageAccess();
    431 
     434    removeAllStorageAccess();
    432435    completionHandler();
    433436}
     
    499502        if (m_memoryStore)
    500503            m_memoryStore->logFrameNavigation(targetPrimaryDomain, mainFramePrimaryDomain, sourcePrimaryDomain, targetHost, mainFrameHost, isRedirect, isMainFrame);
    501     });
    502 }
    503 
    504 void WebResourceLoadStatisticsStore::logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
    505 {
    506     postTask([this, targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), mainFramePrimaryDomain = mainFramePrimaryDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
    507         if (m_memoryStore)
    508             m_memoryStore->logWebSocketLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
    509 
    510         postTaskReply(WTFMove(completionHandler));
    511     });
    512 }
    513 
    514 void WebResourceLoadStatisticsStore::logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
    515 {
    516     postTask([this, targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), mainFramePrimaryDomain = mainFramePrimaryDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
    517         if (m_memoryStore)
    518             m_memoryStore->logSubresourceLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
    519        
    520         postTaskReply(WTFMove(completionHandler));
    521     });
    522 }
    523 
    524 void WebResourceLoadStatisticsStore::logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain, CompletionHandler<void()>&& completionHandler)
    525 {
    526     postTask([this, sourcePrimaryDomain = sourcePrimaryDomain.isolatedCopy(), targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
    527         if (m_memoryStore)
    528             m_memoryStore->logSubresourceRedirect(sourcePrimaryDomain, targetPrimaryDomain);
    529        
    530         postTaskReply(WTFMove(completionHandler));
    531504    });
    532505}
     
    11081081}
    11091082
     1083void WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources(Seconds seconds)
     1084{
     1085    if (m_networkSession)
     1086        m_networkSession->networkStorageSession().setCacheMaxAgeCapForPrevalentResources(seconds);
     1087}
     1088
    11101089void WebResourceLoadStatisticsStore::setCacheMaxAgeCap(Seconds seconds, CompletionHandler<void()>&& completionHandler)
    11111090{
     
    11171096        return;
    11181097    }
    1119 
    1120     if (m_networkSession)
    1121         m_networkSession->networkStorageSession().setCacheMaxAgeCapForPrevalentResources(seconds);
    1122 
     1098    setCacheMaxAgeCapForPrevalentResources(seconds);
    11231099    completionHandler();
    11241100}
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h

    r240446 r240453  
    9292    void logUserInteraction(const URL&, CompletionHandler<void()>&&);
    9393    void logUserInteraction(const String& targetPrimaryDomain, CompletionHandler<void()>&&);
    94     void logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&&);
    95     void logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&&);
    96     void logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain, CompletionHandler<void()>&&);
    9794    void clearUserInteraction(const URL&, CompletionHandler<void()>&&);
    9895    void clearUserInteraction(const String& targetPrimaryDomain, CompletionHandler<void()>&&);
     
    128125    void isGrandfathered(const URL&, CompletionHandler<void(bool)>&&);
    129126    void isGrandfathered(const String&, CompletionHandler<void(bool)>&&);
     127    void removeAllStorageAccess();
    130128    void removePrevalentDomains(const Vector<String>& domainsToBlock);
     129    void setCacheMaxAgeCapForPrevalentResources(Seconds);
    131130    void setNotifyPagesWhenDataRecordsWereScanned(bool, CompletionHandler<void()>&&);
    132131    void setSubframeUnderTopFrameOrigin(const URL& subframe, const URL& topFrame, CompletionHandler<void()>&&);
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp

    r240446 r240453  
    596596}
    597597
    598 void NetworkConnectionToWebProcess::logWebSocketLoading(PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
    599 {
    600 #if ENABLE(RESOURCE_LOAD_STATISTICS)
    601     if (auto networkSession = networkProcess().networkSession(sessionID)) {
    602         if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
    603             resourceLoadStatistics->logWebSocketLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen, [] { });
    604     }
    605 #else
    606     UNUSED_PARAM(sessionID);
    607     UNUSED_PARAM(targetPrimaryDomain);
    608     UNUSED_PARAM(mainFramePrimaryDomain);
    609     UNUSED_PARAM(lastSeen);
    610 #endif
    611 }
    612 
    613 void NetworkConnectionToWebProcess::logSubresourceLoading(PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
    614 {
    615 #if ENABLE(RESOURCE_LOAD_STATISTICS)
    616     if (auto networkSession = networkProcess().networkSession(sessionID)) {
    617         if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
    618             resourceLoadStatistics->logSubresourceLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen, [] { });
    619     }
    620 #else
    621     UNUSED_PARAM(sessionID);
    622     UNUSED_PARAM(targetPrimaryDomain);
    623     UNUSED_PARAM(mainFramePrimaryDomain);
    624     UNUSED_PARAM(lastSeen);
    625 #endif
    626 }
    627 
    628 void NetworkConnectionToWebProcess::logSubresourceRedirect(PAL::SessionID sessionID, const String& sourcePrimaryDomain, const String& targetPrimaryDomain)
    629 {
    630 #if ENABLE(RESOURCE_LOAD_STATISTICS)
    631     if (auto networkSession = networkProcess().networkSession(sessionID)) {
    632         if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
    633             resourceLoadStatistics->logSubresourceRedirect(sourcePrimaryDomain, targetPrimaryDomain, [] { });
    634     }
    635 #else
    636     UNUSED_PARAM(sessionID);
    637     UNUSED_PARAM(sourcePrimaryDomain);
    638     UNUSED_PARAM(targetPrimaryDomain);
    639 #endif
    640 }
    641 
    642598void NetworkConnectionToWebProcess::addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
    643599{
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h

    r240446 r240453  
    196196    void removeStorageAccessForAllFramesOnPage(PAL::SessionID, uint64_t pageID);
    197197    void logUserInteraction(PAL::SessionID, const String& topLevelOrigin);
    198     void logWebSocketLoading(PAL::SessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
    199     void logSubresourceLoading(PAL::SessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
    200     void logSubresourceRedirect(PAL::SessionID, const String& sourcePrimaryDomain, const String& targetPrimaryDomain);
    201198
    202199    void addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains);
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in

    r240446 r240453  
    6161#if ENABLE(RESOURCE_LOAD_STATISTICS)
    6262    LogUserInteraction(PAL::SessionID sessionID, String topLevelOrigin)
    63     LogWebSocketLoading(PAL::SessionID sessionID, String targetPrimaryDomain, String mainFramePrimaryDomain, WallTime lastSeen)
    64     LogSubresourceLoading(PAL::SessionID sessionID, String targetPrimaryDomain, String mainFramePrimaryDomain, WallTime lastSeen)
    65     LogSubresourceRedirect(PAL::SessionID sessionID, String sourcePrimaryDomain, String targetPrimaryDomain)
    6663#endif
    6764
  • trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp

    r240446 r240453  
    9393        return;
    9494
    95     // FIXME(193728): Support ResourceLoadStatistics for ephemeral sessions, too.
    96     if (m_sessionID.isEphemeral())
    97         return;
    98    
    9995    m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(*this, m_resourceLoadStatisticsDirectory);
    10096}
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r240446 r240453  
    556556    SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory, parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectoryExtensionHandle);
    557557
    558     parameters.defaultDataStoreParameters.networkSessionParameters.enableResourceLoadStatistics = true; // FIXME(193705): m_configuration->resourceLoadStatisticsEnabled();
     558    parameters.defaultDataStoreParameters.networkSessionParameters.enableResourceLoadStatistics = false; // FIXME(193297): Turn on when the feature is on. (m_configuration->resourceLoadStatisticsEnabled()?)
    559559
    560560    // Add any platform specific parameters
  • trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm

    r240446 r240453  
    103103        WTFMove(resourceLoadStatisticsDirectory),
    104104        WTFMove(resourceLoadStatisticsDirectoryHandle),
    105         true // FIXME(193705): m_configuration->resourceLoadStatisticsEnabled()
     105        false // FIXME(193297): Switch to m_configuration->resourceLoadStatisticsEnabled()
    106106    };
    107107
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp

    r240446 r240453  
    12531253        // If we are deleting all of the data types that the resource load statistics store monitors
    12541254        // we do not need to re-grandfather old data.
    1255         auto shouldGrandfather = ((monitoredTypesRaw & deletedTypesRaw) == monitoredTypesRaw) ? ShouldGrandfatherStatistics::No : ShouldGrandfatherStatistics::Yes;
    1256 
    12571255        callbackAggregator->addPendingCallback();
    1258         m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(shouldGrandfather, [callbackAggregator] {
    1259             callbackAggregator->removePendingCallback();
    1260         });
     1256        if ((monitoredTypesRaw & deletedTypesRaw) == monitoredTypesRaw)
     1257            m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(ShouldGrandfatherStatistics::No, [callbackAggregator] {
     1258                callbackAggregator->removePendingCallback();
     1259            });
     1260        else
     1261            m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(ShouldGrandfatherStatistics::Yes, [callbackAggregator] {
     1262                callbackAggregator->removePendingCallback();
     1263            });
    12611264
    12621265        callbackAggregator->addPendingCallback();
     
    23232326
    23242327    if (enabled) {
     2328        // FIXME(193297): Remove this assert
     2329        ASSERT(!m_resourceLoadStatistics);
    23252330        enableResourceLoadStatisticsAndSetTestingCallback(nullptr);
    23262331        return;
    23272332    }
     2333
     2334    // FIXME(193297): Remove these two lines
     2335    unregisterWebResourceLoadStatisticsStoreAsMessageReceiver();
     2336    m_resourceLoadStatistics = nullptr;
    23282337
    23292338    for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) {
     
    23872396    setStatisticsTestingCallback(WTFMove(callback));
    23882397
     2398    // FIXME(193297): Remove this check
     2399    if (m_resourceLoadStatistics)
     2400        return;
     2401
    23892402    resolveDirectoriesIfNecessary();
     2403
     2404    // FIXME(193297): Remove these two lines
     2405    m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(*this);
     2406    registerWebResourceLoadStatisticsStoreAsMessageReceiver();
    23902407
    23912408    for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) {
  • trunk/Source/WebKit/WebProcess/WebProcess.cpp

    r240446 r240453  
    389389        m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogUserInteraction(sessionID, topLevelOrigin), 0);
    390390    });
    391 
    392     ResourceLoadObserver::shared().setLogWebSocketLoadingNotificationCallback([this] (PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen) {
    393         m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogWebSocketLoading(sessionID, targetPrimaryDomain, mainFramePrimaryDomain, lastSeen), 0);
    394     });
    395    
    396     ResourceLoadObserver::shared().setLogSubresourceLoadingNotificationCallback([this] (PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen) {
    397         m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceLoading(sessionID, targetPrimaryDomain, mainFramePrimaryDomain, lastSeen), 0);
    398     });
    399 
    400     ResourceLoadObserver::shared().setLogSubresourceRedirectNotificationCallback([this] (PAL::SessionID sessionID, const String& sourcePrimaryDomain, const String& targetPrimaryDomain) {
    401         m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceRedirect(sessionID, sourcePrimaryDomain, targetPrimaryDomain), 0);
    402     });
    403391#endif
    404392
  • trunk/Tools/ChangeLog

    r240450 r240453  
     12019-01-24  Truitt Savell  <tsavell@apple.com>
     2
     3        Unreviewed, rolling out r240446.
     4
     5        Casued 5 API failures
     6
     7        Reverted changeset:
     8
     9        "Activate the WebResourceLoadStatisticsStore in the
     10        NetworkProcess and deactivate it in the UIProcess."
     11        https://bugs.webkit.org/show_bug.cgi?id=193297
     12        https://trac.webkit.org/changeset/240446
     13
    1142019-01-24  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r240446 r240453  
    18611861{
    18621862    cacheTestRunnerCallback(StatisticsDidScanDataRecordsCallbackID, callback);
    1863 
    1864     bool notifyPagesWhenDataRecordsWereScanned = !!callback;
    1865 
    1866     // Setting a callback implies we expect to receive callbacks. So register for them.
    1867     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("StatisticsNotifyPagesWhenDataRecordsWereScanned"));
    1868     WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(notifyPagesWhenDataRecordsWereScanned));
    1869     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), messageBody.get(), nullptr);
    18701863}
    18711864
Note: See TracChangeset for help on using the changeset viewer.