Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6506a07acabe61b6bdb9c347b5f4050b0a2dab7a
      
https://github.com/WebKit/WebKit/commit/6506a07acabe61b6bdb9c347b5f4050b0a2dab7a
  Author: Chris Dumez <[email protected]>
  Date:   2025-02-19 (Wed, 19 Feb 2025)

  Changed paths:
    M Source/WTF/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations
    M Source/WTF/wtf/SuspendableWorkQueue.cpp
    M Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp
    M Tools/TestWebKitAPI/Tests/WTF/WorkQueue.cpp

  Log Message:
  -----------
  Address safer C++ static analysis warnings in SuspendableWorkQueue
https://bugs.webkit.org/show_bug.cgi?id=287882

Reviewed by Ryosuke Niwa.

Update WorkQueue::dispatch() to use keeping `this` alive. There is no need to 
keep `this`
alive for the task to run as with dispatch_queue the task will keep its queue 
alive and
run no matter what.

This means that the call site in SuspendableWorkQueue can now explicitly protect
`this` when dispatching, thus making static analysis happy.

* Source/WTF/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations:
* Source/WTF/wtf/SuspendableWorkQueue.cpp:
(WTF::SuspendableWorkQueue::suspend):
(WTF::SuspendableWorkQueue::dispatch):
(WTF::SuspendableWorkQueue::dispatchAfter):
* Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueueBase::dispatch):
(WTF::WorkQueueBase::dispatchAfter):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to