Bug 226135 - Remove WTF::holdLock() / WTF::holdLockIf()
Summary: Remove WTF::holdLock() / WTF::holdLockIf()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-21 22:02 PDT by Chris Dumez
Modified: 2021-05-22 08:45 PDT (History)
17 users (show)

See Also:


Attachments
Patch (4.93 KB, patch)
2021-05-21 22:04 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 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.
Comment 1 Chris Dumez 2021-05-21 22:04:09 PDT
Created attachment 429401 [details]
Patch
Comment 2 EWS 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].
Comment 3 Radar WebKit Bug Importer 2021-05-21 23:40:16 PDT
<rdar://problem/78344289>
Comment 4 Keith Miller 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?
Comment 5 Chris Dumez 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).