Bug 154926 - Add Page::TimerThrottlingState
Summary: Add Page::TimerThrottlingState
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-02 11:50 PST by Gavin Barraclough
Modified: 2016-03-02 12:39 PST (History)
0 users

See Also:


Attachments
Fix (8.90 KB, patch)
2016-03-02 12:06 PST, Gavin Barraclough
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2016-03-02 11:50:15 PST
Hidden page timer throttling is currently a boolean state, indicated by whether the Optional m_timerThrottlingEnabledTime is in a set/unset state. When enabled, the increasing mechanism may or may not be enable, this is controlled directly by the setting.

Refactor to add a enum tracking timer throttling being in one of three states - disabled, enabled, or enabled-throttling. This cleans things up, and will enabled up to introduce a dynamic policy for when enabled-throttling is enabled. (Behavior is unchanged in this patch.)
Comment 1 Gavin Barraclough 2016-03-02 12:06:04 PST
Created attachment 272670 [details]
Fix
Comment 2 Chris Dumez 2016-03-02 12:25:50 PST
Comment on attachment 272670 [details]
Fix

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

r=me

> Source/WebCore/ChangeLog:10
> +        may or may not be enable, this is controlled directly by the setting.

typo: "enable"

> Source/WebCore/ChangeLog:12
> +        Refactor to add a enum tracking timer throttling being in one of three states - disabled,

Typo: "a enum"

> Source/WebCore/ChangeLog:14
> +        dynamic policy for when enabled-throttling is enabled. (Behavior is unchanged in this patch.)

"enabled-increasing" ?

> Source/WebCore/page/Page.cpp:1230
> +    double throttledDuration = monotonicallyIncreasingTime() - m_timerThrottlingEnabledTime;

We could also assert that m_timerThrottlingEnabledTime is not 0.
Comment 3 Gavin Barraclough 2016-03-02 12:39:38 PST
Transmitting file data ...
Committed revision 197459.