Bug 155031 - Unify determination of page timer alignment
Summary: Unify determination of page timer alignment
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-04 12:16 PST by Gavin Barraclough
Modified: 2016-03-04 12:58 PST (History)
0 users

See Also:


Attachments
Fix (7.34 KB, patch)
2016-03-04 12:22 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-04 12:16:09 PST
Currently this is scattered throughout Page - sites that call setDOMTimerAlignmentInterval have to determine the correct alignment interval.

Instead, replace setDOMTimerAlignmentInterval with updateDOMTimerAlignmentInterval, and unify the policy decision here.
Comment 1 Gavin Barraclough 2016-03-04 12:22:04 PST
Created attachment 273024 [details]
Fix
Comment 2 Chris Dumez 2016-03-04 12:44:12 PST
Comment on attachment 273024 [details]
Fix

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

r=me

> Source/WebCore/page/Page.cpp:1260
> +    else if (!m_timerAlignmentIntervalIncreaseTimer.isActive())

This is not new but is it possible for m_timerAlignmentInterval to change and for the timer to be active? If so, we currently fail to update the timer. I am guessing we may be working around this by disabling and then re-enabling throttling but if so, it is not very nice.
Comment 3 Gavin Barraclough 2016-03-04 12:56:31 PST
(In reply to comment #2)
> Comment on attachment 273024 [details]
>
> This is not new but is it possible for m_timerAlignmentInterval to change
> and for the timer to be active? If so, we currently fail to update the
> timer. I am guessing we may be working around this by disabling and then
> re-enabling throttling but if so, it is not very nice.

Per conversation with Chris, this is a deliberate part of the policy, as a simple solution to prevent timers from being pushed out infinitely.
Comment 4 Gavin Barraclough 2016-03-04 12:58:46 PST
Transmitting file data ...
Committed revision 197581.