Changeset 278286 in webkit
- Timestamp:
- May 31, 2021, 5:04:51 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h (modified) (1 diff)
-
platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r278285 r278286 1 2021-05-31 Chris Dumez <cdumez@apple.com> 2 3 Stop using WTF_IGNORES_THREAD_SAFETY_ANALYSIS in MediaRecorderPrivateWriter code 4 https://bugs.webkit.org/show_bug.cgi?id=226446 5 6 Reviewed by Darin Adler. 7 8 Fold MediaRecorderPrivateWriter::clear() into the destructor since this is the 9 only place it is called. This allows us to stop using WTF_IGNORES_THREAD_SAFETY_ANALYSIS 10 since thread safety checks do not apply to destructors. 11 12 * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: 13 * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: 14 (WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter): 15 (): Deleted. 16 1 17 2021-05-31 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h
r278253 r278286 84 84 private: 85 85 MediaRecorderPrivateWriter(bool hasAudio, bool hasVideo); 86 void clear();87 86 88 87 bool initialize(const MediaRecorderPrivateOptions&); -
trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm
r278158 r278286 128 128 MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter() 129 129 { 130 clear(); 130 m_pendingAudioSampleQueue.clear(); 131 m_pendingVideoSampleQueue.clear(); 132 if (m_writer) { 133 [m_writer cancelWriting]; 134 m_writer.clear(); 135 } 136 137 // At this pointer, we should no longer be writing any data, so it should be safe to close and nullify m_data without locking. 138 if (m_writerDelegate) 139 [m_writerDelegate close]; 140 m_data = nullptr; 141 142 if (auto completionHandler = WTFMove(m_fetchDataCompletionHandler)) 143 completionHandler(nullptr, 0); 131 144 } 132 145 … … 367 380 } 368 381 369 // FIXME: This modifies m_data without grabbing m_dataLock.370 void MediaRecorderPrivateWriter::clear() WTF_IGNORES_THREAD_SAFETY_ANALYSIS371 {372 m_pendingAudioSampleQueue.clear();373 m_pendingVideoSampleQueue.clear();374 if (m_writer) {375 [m_writer cancelWriting];376 m_writer.clear();377 }378 379 // At this pointer, we should no longer be writing any data, so it should be safe to close and nullify m_data without locking.380 if (m_writerDelegate)381 [m_writerDelegate close];382 m_data = nullptr;383 384 if (auto completionHandler = WTFMove(m_fetchDataCompletionHandler))385 completionHandler(nullptr, 0);386 }387 388 389 382 static inline RetainPtr<CMSampleBufferRef> copySampleBufferWithCurrentTimeStamp(CMSampleBufferRef originalBuffer, CMTime startTime) 390 383 {
Note:
See TracChangeset
for help on using the changeset viewer.