Bug 175673

Summary: [GStreamer] GstStructure shouldn't be handled through GRefPtr
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Zan Dobersek 2017-08-17 07:57:41 PDT
[GStreamer] GstStructure shouldn't be handled through GRefPtr
Comment 1 Zan Dobersek 2017-08-17 07:59:02 PDT
Created attachment 318368 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2017-08-17 08:27:09 PDT
Comment on attachment 318368 [details]
Patch

O_O
Comment 3 Michael Catanzaro 2017-08-17 08:29:40 PDT
This is bad. How did it not crash? How did it even compile if it doesn't support g_object_ref/unref and there's no template specialization for GstStructure?
Comment 4 Zan Dobersek 2017-08-17 09:37:31 PDT
Comment on attachment 318368 [details]
Patch

Clearing flags on attachment: 318368

Committed r220861: <http://trac.webkit.org/changeset/220861>
Comment 5 Zan Dobersek 2017-08-17 09:37:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Xabier Rodríguez Calvar 2017-08-17 09:38:01 PDT
(In reply to Michael Catanzaro from comment #3)
> This is bad. How did it not crash? How did it even compile if it doesn't
> support g_object_ref/unref and there's no template specialization for
> GstStructure?

I ask myself the same question.
Comment 7 Radar WebKit Bug Importer 2017-08-17 09:38:02 PDT
<rdar://problem/33942200>
Comment 8 Zan Dobersek 2017-08-17 09:56:35 PDT
(In reply to Xabier Rodríguez Calvar from comment #6)
> (In reply to Michael Catanzaro from comment #3)
> > This is bad. How did it not crash? How did it even compile if it doesn't
> > support g_object_ref/unref and there's no template specialization for
> > GstStructure?
> 
> I ask myself the same question.

gst_object_ref() was never called because all values were adopted into the GRefPtr<> object. gst_object_unref() was never called because the managed pointer was leaked from the GRefPtr<> object.