Changeset 278925 in webkit
- Timestamp:
- Jun 16, 2021, 1:15:54 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r278923 r278925 1 2021-06-16 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] clang analysis: Unlocked access in ImageDecoderGStreamer.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=226495 5 6 Reviewed by Adrian Perez de Castro. 7 8 Remove unlocked access to the the m_messageDispatched instance variable. Also there is no 9 need to wait on the condition if the dispatching happens synchronously in the current 10 thread. No need to notify the condition either before dispatching, the only call to wait() 11 is after the asynchronous dispatch has been scheduled. 12 13 * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: 14 (WebCore::ImageDecoderGStreamer::InnerDecoder::preparePipeline): 15 1 16 2021-06-16 Martin Robinson <mrobinson@webkit.org> 2 17 -
trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
r278892 r278925 374 374 Locker locker { decoder.m_messageLock }; 375 375 decoder.m_messageDispatched = false; 376 decoder.m_messageCondition.notifyOne();377 376 } 378 377 if (&decoder.m_runLoop == &RunLoop::current()) … … 385 384 weakThis->handleMessage(protectedMessage.get()); 386 385 }); 387 } 388 if (!decoder.m_messageDispatched) { 389 Locker locker { decoder.m_messageLock }; 390 decoder.m_messageCondition.wait(decoder.m_messageLock); 386 { 387 Locker locker { decoder.m_messageLock }; 388 if (!decoder.m_messageDispatched) 389 decoder.m_messageCondition.wait(decoder.m_messageLock); 390 } 391 391 } 392 392 gst_message_unref(message);
Note:
See TracChangeset
for help on using the changeset viewer.