[Webkit-unassigned] [Bug 154285] [GStreamer] clean-up various leaks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 18 12:27:19 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=154285

--- Comment #4 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 271425
  --> https://bugs.webkit.org/attachment.cgi?id=271425
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=271425&action=review

>>> Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:196
>>> +    priv->task = adoptGRef(gst_task_new(reinterpret_cast<GstTaskFunction>(webKitWebAudioSrcLoop), src, 0));
>> 
>> GstTask is GInitiallyUnowned, so this returns a floating reference that we should consume here, so adoptGRef is not correct. Aren't you hitting the assert in GRefPtr<GstTask> adoptGRef(GstTask* ptr) ?
> 
> Heh. No :)
> But I'll double-check.

This should be adoptGRef(g_object_ref_sink(gst_task_new(...))), correct?

I think floating references are not useful in combination with GRefPtr, so why don't we take it always in adoptGRef() (e.g. by calling g_object_is_floating() and then g_object_ref_sink() if that return TRUE)? What is the value in asserting that the ptr is not floating? (Why do we do that only in GRefPtrGStreamer.cpp and not in GRefPtr.cpp?) Am I missing something here?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160218/0022093a/attachment-0001.html>


More information about the webkit-unassigned mailing list