Bug 226135

Summary: Remove WTF::holdLock() / WTF::holdLockIf()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, cmarcelo, darin, ddkilzer, esprehn+autocc, ews-watchlist, ggaren, kangil.han, keith_miller, kkinnunen, mark.lam, msaboff, saam, sam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2021-05-21 22:02:09 PDT
Remove WTF::holdLock() / WTF::holdLockIf() because they are not compatible with Clang Thread Safety Analysis. All call sites have been converted to use the Locker constructor directly.
Attachments
Patch (4.93 KB, patch)
2021-05-21 22:04 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-05-21 22:04:09 PDT
EWS
Comment 2 2021-05-21 23:39:52 PDT
Committed r277914 (238047@main): <https://commits.webkit.org/238047@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429401 [details].
Radar WebKit Bug Importer
Comment 3 2021-05-21 23:40:16 PDT
Keith Miller
Comment 4 2021-05-22 06:26:03 PDT
Out of curiosity, why is it incompatible? You'd think and r-value reference would be the same as as the r-value constructor?
Chris Dumez
Comment 5 2021-05-22 08:45:33 PDT
(In reply to Keith Miller from comment #4) > Out of curiosity, why is it incompatible? You'd think and r-value reference > would be the same as as the r-value constructor? Not sure which r-value constructor you're referring to. The Locker<CheckedLock> specialization in CheckedLock.h does not have a move or copy constructor. AFAIK, this isn't supposed by clang thread safety analysis (https://clang.llvm.org/docs/ThreadSafetyAnalysis.html).
Note You need to log in before you can comment on or make changes to this bug.