[webkit-reviews] review denied: [Bug 186903] Resource Load Statistics: Make WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains() wait for the network process before calling its callback : [Attachment 343520] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 25 11:53:00 PDT 2018


Chris Dumez <cdumez at apple.com> has denied John Wilander <wilander at apple.com>'s
request for review:
Bug 186903: Resource Load Statistics: Make
WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains() wait for
the network process before calling its callback
https://bugs.webkit.org/show_bug.cgi?id=186903

Attachment 343520: Patch

https://bugs.webkit.org/attachment.cgi?id=343520&action=review




--- Comment #8 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 343520
  --> https://bugs.webkit.org/attachment.cgi?id=343520
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=343520&action=review

> Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:1305
> +	  
m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler(domainsToPartition,
domainsToBlock, domainsToNeitherPartitionNorBlock, ShouldClearFirst::No,
WTFMove(completionHandler));

We want completionHandler to be called on the background thread here since
WebResourceLoadStatisticsStore::updateCookiePartitioning() gets called on the
background thread. Therefore, I believe this should be:
m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler(domainsToPartition,
domainsToBlock, domainsToNeitherPartitionNorBlock, ShouldClearFirst::No,
[completionHandler = WTFMove(completionHandler] {
    m_statisticsQueue->dispatch([completionHandler =
WTFMove(completionHandler)]() mutable {
	     completionHandler();
     });
});

> Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:1337
> +	  
m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler(domainsToPartition,
domainsToBlock, domainsToNeitherPartitionNorBlock, shouldClearFirst,
WTFMove(completionHandler));

Same issue here,
WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains() gets
called on the background thread, so completionHandler needs to be called on the
background thread.

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:1211
> +	  
processPool->networkProcess()->updatePrevalentDomainsToPartitionOrBlockCookies(
m_sessionID, domainsToPartition, domainsToBlock,
domainsToNeitherPartitionNorBlock, shouldClearFirst,
WTFMove(completionHandler));

processPool->networkProcess() can return null.


More information about the webkit-reviews mailing list