Bug 174237

Summary: Fix bad usage of static variables in ResourceLoadStatisticsStore
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, wilander
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Chris Dumez 2017-07-06 20:45:59 PDT
Fix bad usage of static variables in ResourceLoadStatisticsStore. Those can be set via member functions on ResourceLoadStatisticsStore so they should be data members. The API to set them is associated to a particular store and there can in theory be several stores.
Comment 1 Chris Dumez 2017-07-06 20:47:44 PDT
Created attachment 314806 [details]
Patch
Comment 2 Chris Dumez 2017-07-06 20:48:25 PDT
Created attachment 314808 [details]
Patch
Comment 3 Chris Dumez 2017-07-06 20:50:31 PDT
Created attachment 314809 [details]
Patch
Comment 4 Brent Fulgham 2017-07-06 21:36:07 PDT
Comment on attachment 314809 [details]
Patch

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

> Source/WebKit2/UIProcess/Storage/ResourceLoadStatisticsStore.cpp:263
> +        m_timeToLiveUserInteraction = seconds;

These are all fine, but I would have preferred an early return for < 0 in the original version.
Comment 5 Chris Dumez 2017-07-06 21:41:39 PDT
Created attachment 314813 [details]
Patch
Comment 6 WebKit Commit Bot 2017-07-06 22:19:16 PDT
Comment on attachment 314813 [details]
Patch

Clearing flags on attachment: 314813

Committed r219242: <http://trac.webkit.org/changeset/219242>
Comment 7 WebKit Commit Bot 2017-07-06 22:19:18 PDT
All reviewed patches have been landed.  Closing bug.