[webkit-changes] [WebKit/WebKit] 4bd78a: Migrate use of SuspendableTimer to EventLoop
Ryosuke Niwa
noreply at github.com
Mon Aug 7 16:47:00 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4bd78ab3969b623c27406ed7811aee9fa7def839
https://github.com/WebKit/WebKit/commit/4bd78ab3969b623c27406ed7811aee9fa7def839
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/editing/AlternativeTextController.cpp
M Source/WebCore/editing/AlternativeTextController.h
M Source/WebCore/html/ImageBitmap.cpp
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
M Source/WebCore/html/canvas/WebGLRenderingContextBase.h
M Source/WebCore/page/EventSource.cpp
M Source/WebCore/page/EventSource.h
Log Message:
-----------
Migrate use of SuspendableTimer to EventLoop
https://bugs.webkit.org/show_bug.cgi?id=259881
Reviewed by Wenson Hsieh.
This PR introduces two new member functions scheduleTask and cancelScheduledTask to
EventLoop and EventLoopTaskGroup to replace the use of SuspendableTimer.
scheduleTask internally creates a new SuspendableTimer and returns the pointer value of
the timer as uintptr_t. This value can then be used to call cancelScheduledTask.
This PR replaces most uses of SuspendableTimer with scheduleTask and cancelScheduledTask.
* Source/WebCore/dom/EventLoop.cpp:
(WebCore::EventLoop::scheduleTask):
(WebCore::EventLoop::cancelScheduledTask):
(WebCore::EventLoopTaskGroup::scheduleTask):
(WebCore::EventLoopTaskGroup::cancelScheduledTask):
* Source/WebCore/dom/EventLoop.h:
* Source/WebCore/editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::startAlternativeTextUITimer):
(WebCore::AlternativeTextController::stopAlternativeTextUITimer):
* Source/WebCore/editing/AlternativeTextController.h:
* Source/WebCore/html/ImageBitmap.cpp:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::forceRestoreContext):
(WebCore::WebGLRenderingContextBase::scheduleTaskToDispatchContextLostEvent):
(WebCore::WebGLRenderingContextBase::maybeRestoreContextSoon):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
* Source/WebCore/page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::scheduleInitialConnect):
(WebCore::EventSource::scheduleReconnect):
(WebCore::EventSource::close):
* Source/WebCore/page/EventSource.h:
Canonical link: https://commits.webkit.org/266664@main
More information about the webkit-changes
mailing list