Clean up GMutexLocker
Created attachment 236434 [details] Patch
Comment on attachment 236434 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236434&action=review > Source/WTF/wtf/gobject/GMutexLocker.h:28 > -namespace WebCore { > +namespace WTF { wow! > Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:237 > - if (priv->bufferMutex) { > - g_mutex_clear(priv->bufferMutex); > - delete priv->bufferMutex; > - priv->bufferMutex = 0; > - } > + g_mutex_clear(&priv->bufferMutex); You can't do this here, dispose might be called multiple times, and g_mutex_clear should not be used on an already cleared mutex, because the internal pointer is not checked and it's not reset either when freed. Since we are using placement new syntax, I would add a constructor of WebKitVideoSinkPrivate to init the mutex, and a destructor to clear it.
Created attachment 236436 [details] Patch
Comment on attachment 236436 [details] Patch Clearing flags on attachment: 236436 Committed r172441: <http://trac.webkit.org/changeset/172441>
All reviewed patches have been landed. Closing bug.