Bug 185992

Summary: WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback() unexpectedly constructs a process pool
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, bfulgham, commit-queue, ggaren, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2018-05-25 13:23:54 PDT
WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback() unexpectedly constructs a process pool:
Sample Count, Samples %, CPU %, Symbol
14, 0.1%, 0.1%, WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled(bool) (in WebKit)
14, 0.1%, 0.1%,     WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback(WTF::Function<void (WTF::String const&)>&&) (in WebKit)
14, 0.1%, 0.1%,         WebKit::WebsiteDataStore::processPools(unsigned long, bool) const (in WebKit)
12, 0.1%, 0.1%,             WebKit::WebProcessPool::create(API::ProcessPoolConfiguration&) (in WebKit)
Comment 1 Chris Dumez 2018-05-25 13:27:25 PDT
Created attachment 341318 [details]
Patch
Comment 2 John Wilander 2018-05-25 13:49:44 PDT
Did you test so that this doesn't turn off the feature in the cases where we expect it to be turned on?
Comment 3 Chris Dumez 2018-05-25 13:58:30 PDT
(In reply to John Wilander from comment #2)
> Did you test so that this doesn't turn off the feature in the cases where we
> expect it to be turned on?

If I add logging in the WebProcess and launch Safari I see:
WebProcess::setResourceLoadStatisticsEnabled(1)

So the feature still gets enabled.
Comment 4 Geoffrey Garen 2018-05-25 14:19:35 PDT
Comment on attachment 341318 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2018-05-25 14:35:35 PDT
Comment on attachment 341318 [details]
Patch

Clearing flags on attachment: 341318

Committed r232203: <https://trac.webkit.org/changeset/232203>
Comment 6 WebKit Commit Bot 2018-05-25 14:35:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-05-25 14:38:08 PDT
<rdar://problem/40566386>