Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b2ef317d683b7556731218374d70c5aa3aaf76c
      
https://github.com/WebKit/WebKit/commit/6b2ef317d683b7556731218374d70c5aa3aaf76c
  Author: Ryosuke Niwa <[email protected]>
  Date:   2023-08-08 (Tue, 08 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/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.h
    M Source/WebCore/page/EventSource.cpp
    M Source/WebCore/page/EventSource.h
    M Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.cpp
    M Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.h

  Log Message:
  -----------
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to