-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace EventLoopTimerPtr with EventLoopTimerHandle
https://bugs.webkit.org/show_bug.cgi?id=259955 Reviewed by Wenson Hsieh. This PR replaces EventLoopTimerPtr, which is a type cast of EventLoopTimer*, with a proper EventLoopTimerHandle which knows how to clean up itself at the end. EventLoopTimerHandle is simply a wrapper around RefPtr<EventLoopTimer> now that EventLoopTimer is reference counted. This PR also removes cancelScheduledTask and cancelRepeatingTask from EventLoop and EventLoopTaskGroup as the timer is automatically deleted when the handle dies. * Source/WebCore/dom/EventLoop.cpp: (WebCore::EventLoopTimerHandle::EventLoopTimerHandle): (WebCore::EventLoopTimerHandle::~EventLoopTimerHandle): (WebCore::EventLoopTimerHandle::operator=): (WebCore::EventLoop::scheduleTask): (WebCore::EventLoop::cancelScheduledTask): Deleted. (WebCore::EventLoop::removeScheduledTimer): (WebCore::EventLoop::didExecuteScheduledTask): Deleted. (WebCore::EventLoop::scheduleRepeatingTask): (WebCore::EventLoop::cancelRepeatingTask): Deleted. (WebCore::EventLoop::removeRepeatingTimer): (WebCore::EventLoopTaskGroup::scheduleTask):. (WebCore::EventLoopTaskGroup::cancelScheduledTask): Deleted. (WebCore::EventLoopTaskGroup::didExecuteScheduledTask): Deleted. (WebCore::EventLoopTaskGroup::removeScheduledTimer): (WebCore::EventLoopTaskGroup::scheduleRepeatingTask): (WebCore::EventLoopTaskGroup::cancelRepeatingTask): Deleted. (WebCore::EventLoopTaskGroup::removeRepeatingTimer): * Source/WebCore/dom/EventLoop.h: (WebCore::EventLoopTimerHandle::operator UnspecifiedBoolType const): (WebCore::EventLoopTimerHandle::unspecifiedBoolTypeInstance const): * Source/WebCore/editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::stopAlternativeTextUITimer): * Source/WebCore/editing/AlternativeTextController.h: * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::maybeRestoreContextSoon): * Source/WebCore/html/canvas/WebGLRenderingContextBase.h: * Source/WebCore/page/EventSource.cpp: (WebCore::EventSource::scheduleInitialConnect): (WebCore::EventSource::scheduleReconnect): (WebCore::EventSource::close): * Source/WebCore/page/EventSource.h: * Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEventTimerFired): * Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.h: Canonical link: https://commits.webkit.org/266715@main
- Loading branch information
Showing
10 changed files
with
114 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.