[webkit-changes] [WebKit/WebKit] cf15c6: Externalize Timer::alignedFireTime

Ryosuke Niwa noreply at github.com
Wed Aug 9 20:35:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cf15c62f09b9d24360ad457dc410559d1fcf7529
      https://github.com/WebKit/WebKit/commit/cf15c62f09b9d24360ad457dc410559d1fcf7529
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M Source/WebCore/dom/ScriptExecutionContext.h
    M Source/WebCore/page/DOMTimer.cpp
    M Source/WebCore/page/DOMTimer.h
    M Source/WebCore/page/SuspendableTimer.h
    M Source/WebCore/platform/Timer.cpp
    M Source/WebCore/platform/Timer.h
    M Source/WebCore/testing/Internals.cpp

  Log Message:
  -----------
  Externalize Timer::alignedFireTime
https://bugs.webkit.org/show_bug.cgi?id=259997

Reviewed by Wenson Hsieh.

This PR replaces Timer::alignedFireTime with ScriptExecutionContext::alignedFireTime
with TimerAlignment abstract interface as a preparation to integrate DOM timers with
HTML5 event loop.

* Source/WebCore/dom/ScriptExecutionContext.h:
* Source/WebCore/page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
(WebCore::ScriptExecutionContext::alignedFireTime const):
(WebCore::DOMTimer::alignedFireTime const): Deleted.
* Source/WebCore/page/DOMTimer.h:
* Source/WebCore/page/SuspendableTimer.h:
* Source/WebCore/platform/Timer.cpp:
(WebCore::TimerBase::setNextFireTime):
* Source/WebCore/platform/Timer.h:
(WebCore::TimerAlignment): Added.
(WebCore::TimerBase::setTimerAlignment):
(WebCore::TimerBase::timerAlignment):
(WebCore::TimerBase::hasReachedMaxNestingLevel const):
(WebCore::TimerBase::setHasReachedMaxNestingLevel):
(WebCore::TimerBase::alignedFireTime const): Deleted.
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::isTimerThrottled):

Canonical link: https://commits.webkit.org/266751@main




More information about the webkit-changes mailing list