Stop using WTF_IGNORES_THREAD_SAFETY_ANALYSIS in MediaRecorderPrivateWriter code by refactoring the code slightly.
Created attachment 430165 [details] Patch
Comment on attachment 430165 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430165&action=review > Source/WebCore/ChangeLog:10 > + this thread safety checks do not apply to destructors. "this" -> "since" Seems like this doesn’t really make anything safer! Just quiets the compiler.
Comment on attachment 430165 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430165&action=review >> Source/WebCore/ChangeLog:10 >> + this thread safety checks do not apply to destructors. > > "this" -> "since" > > Seems like this doesn’t really make anything safer! Just quiets the compiler. I think it makes the code look safer. There is a reason clang doesn't apply threading checks to constructors and destructors: there is usually a single thread when those are executed. I much prefer this than having a separate clear() function annotated with WTF_IGNORES_THREAD_SAFETY_ANALYSIS, which might get called from outside the destructor in the future, in an unsafe way.
Committed r278286 (238323@main): <https://commits.webkit.org/238323@main>
<rdar://problem/78695299>