WebKit Bugzilla
Attachment 372002 Details for
Bug 198814
: WebResourceLoadStatisticsStore should not use its network session if invalidated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198814-20190612170934.patch (text/plain), 3.50 KB, created by
youenn fablet
on 2019-06-12 17:09:34 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-06-12 17:09:34 PDT
Size:
3.50 KB
patch
obsolete
>Subversion Revision: 246347 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index e5cfe169a2a9f109b253018825df1c3f3ce75fae..b88f7f980d58044ba783c35f5903b38d5bc5e381 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-12 Youenn Fablet <youenn@apple.com> >+ >+ WebResourceLoadStatisticsStore should not use its network session if invalidated >+ https://bugs.webkit.org/show_bug.cgi?id=198814 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tell WebResourceLoadStatisticsStore that its network session is invalidated. >+ WebResourceLoadStatisticsStore will then clear its reference to the network session. >+ >+ * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: >+ (WebKit::WebResourceLoadStatisticsStore::invalidateAndCancel): >+ * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: >+ * NetworkProcess/NetworkSession.cpp: >+ (WebKit::NetworkSession::invalidateAndCancel): >+ > 2019-06-12 Youenn Fablet <youenn@apple.com> > > Use NSURLSession for WebSocket >diff --git a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >index 914d35bde8a003dae0d61b06491a08b720c0bdaa..b668df23075ba1728b7f4b6b53b21ab9bf78b3fc 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >+++ b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >@@ -1021,6 +1021,11 @@ NetworkSession* WebResourceLoadStatisticsStore::networkSession() > return m_networkSession.get(); > } > >+void WebResourceLoadStatisticsStore::invalidateAndCancel() >+{ >+ m_networkSession = nullptr; >+} >+ > void WebResourceLoadStatisticsStore::deleteWebsiteDataForRegistrableDomains(OptionSet<WebsiteDataType> dataTypes, HashMap<RegistrableDomain, WebsiteDataToRemove>&& domainsToRemoveWebsiteDataFor, bool shouldNotifyPage, CompletionHandler<void(const HashSet<RegistrableDomain>&)>&& completionHandler) > { > ASSERT(RunLoop::isMain()); >diff --git a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h >index a8c23e09b3f727848c11a77a7ee5f1925573f5b3..f19a73d6fbc2ea258bc998ead5d2275c2fca09a1 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h >+++ b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h >@@ -176,6 +176,7 @@ public: > void notifyResourceLoadStatisticsProcessed(); > > NetworkSession* networkSession(); >+ void invalidateAndCancel(); > > void sendDiagnosticMessageWithValue(const String& message, const String& description, unsigned value, unsigned sigDigits, WebCore::ShouldSample) const; > void notifyPageStatisticsTelemetryFinished(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins) const; >diff --git a/Source/WebKit/NetworkProcess/NetworkSession.cpp b/Source/WebKit/NetworkProcess/NetworkSession.cpp >index 3544fa4cc5f83e9744f4dff36415e2caa42a459e..1e1840e9d6e3ab24ba89442e4ca849b52fade58e 100644 >--- a/Source/WebKit/NetworkProcess/NetworkSession.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkSession.cpp >@@ -100,6 +100,8 @@ void NetworkSession::invalidateAndCancel() > { > for (auto* task : m_dataTaskSet) > task->invalidateAndCancel(); >+ if (m_resourceLoadStatistics) >+ m_resourceLoadStatistics->invalidateAndCancel(); > } > > #if ENABLE(RESOURCE_LOAD_STATISTICS)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198814
:
372002
|
372009
|
372135