WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
154559
Some timer alignment cleanup.
https://bugs.webkit.org/show_bug.cgi?id=154559
Summary
Some timer alignment cleanup.
Gavin Barraclough
Reported
2016-02-22 14:57:51 PST
Document shouldn't override Page's timer alignment policy with a lower alignment, and m_domTimerAlignmentInterval isn't really a Settings, it's just the current state for the page.
Attachments
Fix
(7.16 KB, patch)
2016-02-22 16:16 PST
,
Gavin Barraclough
cdumez
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Gavin Barraclough
Comment 1
2016-02-22 16:16:23 PST
Created
attachment 271963
[details]
Fix
Anders Carlsson
Comment 2
2016-02-22 17:01:43 PST
Comment on
attachment 271963
[details]
Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=271963&action=review
You should change this to use std::chrono::milliseconds!
> Source/WebCore/page/Page.h:620 > - bool m_timerThrottlingEnabled; > + bool m_timerThrottlingEnabledTime; > + double m_timerAlignmentInterval;
Can this use Optional instead?
Gavin Barraclough
Comment 3
2016-02-22 17:45:13 PST
(In reply to
comment #2
)
> Comment on
attachment 271963
[details]
> Fix > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=271963&action=review
> > You should change this to use std::chrono::milliseconds!
Heh, probably! - sure I'll look into this. (But as a separate change - these intervals are all currently doubles & I should probably switch double -> chrono::milliseconds in a bunch of other places at the same time).
> > Source/WebCore/page/Page.h:620 > > - bool m_timerThrottlingEnabled; > > + bool m_timerThrottlingEnabledTime; > > + double m_timerAlignmentInterval; > > Can this use Optional instead?
Interesting. I don't think this should be an Optional - when timer throttling is disabled the timer alignment property does still hold a value (DOMTimer::defaultAlignmentInterval() - which theoretically could be non-zero). Also I plan on replacing m_timerThrottlingEnabled with the timestamp at which time throttling is enabled, so we know how long it has been - come to think of it, that probably should be an Optional.
Chris Dumez
Comment 4
2016-02-22 18:48:39 PST
Comment on
attachment 271963
[details]
Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=271963&action=review
r=me % nits
> Source/WebCore/dom/Document.cpp:2934 > + if (Page* page = this->page())
auto*
> Source/WebCore/page/Page.cpp:208 > + , m_timerThrottlingEnabledTime(false)
I prefer the previous name since this is a boolean.
Gavin Barraclough
Comment 5
2016-02-22 23:28:54 PST
> > Source/WebCore/page/Page.cpp:208 > > + , m_timerThrottlingEnabledTime(false) > > I prefer the previous name since this is a boolean.
Oops, yes!
Gavin Barraclough
Comment 6
2016-02-22 23:37:35 PST
Transmitting file data ...... Committed revision 196971.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug