Bug 174237 - Fix bad usage of static variables in ResourceLoadStatisticsStore
Summary: Fix bad usage of static variables in ResourceLoadStatisticsStore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-06 20:45 PDT by Chris Dumez
Modified: 2017-07-06 22:19 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.97 KB, patch)
2017-07-06 20:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.96 KB, patch)
2017-07-06 20:48 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.97 KB, patch)
2017-07-06 20:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.07 KB, patch)
2017-07-06 21:41 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.