Bug 174174

Summary: [WK2] WebsiteDataStore::setResourceLoadStatisticsEnabled() updates processPools the store is not associated with
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, bfulgham, commit-queue, ggaren, wilander
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2017-07-05 14:12:17 PDT
WebsiteDataStore::setResourceLoadStatisticsEnabled() updates processPools the store is not associated with.
Attachments
Patch (13.82 KB, patch)
2017-07-05 14:15 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2017-07-05 14:15:39 PDT
Brent Fulgham
Comment 2 2017-07-05 14:25:20 PDT
Comment on attachment 314655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=314655&action=review > Source/WebKit2/ChangeLog:15 > + as well as corresponding methods as those appear to be unused. Yikes! Good catch.
Brent Fulgham
Comment 3 2017-07-05 14:59:05 PDT
Comment on attachment 314655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=314655&action=review Looks good. r=me. > Source/WebKit2/UIProcess/WebProcessPool.cpp:1117 > + sendToAllProcesses(Messages::WebProcess::SetResourceLoadStatisticsEnabled(enabled)); This is much tidier! > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:1271 > + for (auto& processPool : processPools()) Idea: processPools() should have a method that takes a lambda and applies it to each process in the pool. > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:1281 > + m_resourceLoadStatistics->registerSharedResourceLoadObserver([this] (const Vector<String>& domainsToRemove, const Vector<String>& domainsToAdd, bool shouldClearFirst) { I noticed that 'this' is refcounted. Do we need to capture it in this lambda?
WebKit Commit Bot
Comment 4 2017-07-05 15:27:50 PDT
Comment on attachment 314655 [details] Patch Clearing flags on attachment: 314655 Committed r219161: <http://trac.webkit.org/changeset/219161>
WebKit Commit Bot
Comment 5 2017-07-05 15:27:52 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.