[webkit-changes] [WebKit/WebKit] ed1685: Use EventLoop in XMLHttpRequestProgressEventThrott...

Ryosuke Niwa noreply at github.com
Mon Aug 7 23:00:49 PDT 2023


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

  Changed paths:
    M Source/WebCore/dom/EventLoop.cpp
    M Source/WebCore/dom/EventLoop.h
    M Source/WebCore/page/SuspendableTimer.cpp
    M Source/WebCore/page/SuspendableTimer.h
    M Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.cpp
    M Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.h

  Log Message:
  -----------
  Use EventLoop in XMLHttpRequestProgressEventThrottle instead of SuspendableTimer
https://bugs.webkit.org/show_bug.cgi?id=259901

Reviewed by Wenson Hsieh.

Replaced the use of SuspendableTimer in XMLHttpRequestProgressEventThrottle by
EventLoop/EventLoopTaskGroup's scheduleRepeatingTask and cancelRepeatingTask.

This PR also removes SuspendableTimer itself, only leaving SuspendableTimerBase,
which is used by DOMTimer and EventLoop itself.

* Source/WebCore/dom/EventLoop.cpp:
(WebCore::EventLoop::scheduleRepeatingTask):
(WebCore::EventLoop::cancelRepeatingTask):
(WebCore::EventLoopTaskGroup::scheduleRepeatingTask):
(WebCore::EventLoopTaskGroup::cancelRepeatingTask):
* Source/WebCore/dom/EventLoop.h:
* Source/WebCore/page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::SuspendableTimer): Deleted.
(WebCore::SuspendableTimer::activeDOMObjectName const): Deleted.
* Source/WebCore/page/SuspendableTimer.h:
* Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
(WebCore::XMLHttpRequestProgressEventThrottle::updateProgress):
(WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEventTimerFired):
* Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.h:

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




More information about the webkit-changes mailing list