Changeset 279905 in webkit
- Timestamp:
- Jul 13, 2021, 10:57:07 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r279904 r279905 1 2021-07-13 Jean-Yves Avenard <jya@apple.com> 2 3 MediaSessionManagerCocoa::ensureCodecsRegistered() isn't thread-safe 4 https://bugs.webkit.org/show_bug.cgi?id=227940 5 6 Reviewed by Maciej Stachowiak. 7 8 C++11 static initializers aren't thread-safe due to architectural and compilation 9 option choices. So we use Grand Central Dispatch's dispatch_once instead. 10 11 * platform/audio/cocoa/MediaSessionManagerCocoa.mm: 12 (WebCore::MediaSessionManagerCocoa::ensureCodecsRegistered): 13 1 14 2021-07-13 Jean-Yves Avenard <jya@apple.com> 2 15 -
trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm
r278483 r279905 66 66 void MediaSessionManagerCocoa::ensureCodecsRegistered() 67 67 { 68 static bool sInitDone = []() {69 68 #if ENABLE(VP9) 69 static dispatch_once_t onceToken; 70 dispatch_once(&onceToken, ^{ 70 71 if (shouldEnableVP9Decoder()) 71 72 registerSupplementalVP9Decoder(); … … 74 75 if (shouldEnableVP9SWDecoder()) 75 76 registerWebKitVP9Decoder(); 77 }); 76 78 #endif 77 return true;78 }();79 UNUSED_VARIABLE(sInitDone);80 79 } 81 80
Note:
See TracChangeset
for help on using the changeset viewer.