[webkit-changes] [WebKit/WebKit] 741a55: Timer::stop can short-circuit in most cases

Ryosuke Niwa noreply at github.com
Thu Jan 18 22:51:46 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 741a55f3d6f1dda9857b4d20d45a9f9125af9426
      https://github.com/WebKit/WebKit/commit/741a55f3d6f1dda9857b4d20d45a9f9125af9426
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/Timer.cpp
    M Source/WebCore/platform/Timer.h

  Log Message:
  -----------
  Timer::stop can short-circuit in most cases
https://bugs.webkit.org/show_bug.cgi?id=267746

Reviewed by Yusuke Suzuki and Darin Adler.

Add a fast path for when the timer isn't scheduled.

* Source/WebCore/platform/Timer.cpp:
(WebCore::TimerBase::stopSlowCase):
(WebCore::TimerBase::stop): Deleted.
* Source/WebCore/platform/Timer.h:
(WebCore::TimerBase::stop):

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




More information about the webkit-changes mailing list