[webkit-changes] [WebKit/WebKit] 188e12: Suppress uncounted lambda capture warning in WebCo...

Claudio Saavedra noreply at github.com
Mon Feb 24 11:25:52 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 188e126c3653225abd7056dc90eaecda4c8cff18
      https://github.com/WebKit/WebKit/commit/188e126c3653225abd7056dc90eaecda4c8cff18
  Author: Claudio Saavedra <csaavedra at igalia.com>
  Date:   2025-02-24 (Mon, 24 Feb 2025)

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

  Log Message:
  -----------
  Suppress uncounted lambda capture warning in WebCore::Timer
https://bugs.webkit.org/show_bug.cgi?id=288370

Reviewed by Chris Dumez.

The use pattern of Timer objects is that they are stored as a member variable
of the object that is captured in the lambda, so its lifetime is bound
to the lifetime of the object, therefore there's no risk in capturing
the object uncounted. Furthermore, capturing a reference will cause a circular
reference and a leak. So this warning can be suppressed.

* Source/WebCore/platform/Timer.h:
(WebCore::Timer::Timer):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list