Bug 110103

Summary: [Soup] Free cookies explicitly in loops instead of using GOwnPtr
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, danw, gustavo, laszlo.gombos, mrobinson, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2013-02-18 04:37:28 PST
We sometimes use GOwnPtr to free the cookies, and sometimes free them manually using soup_cookie_free(). We should make this more consistent and use GOwnPtr as much as possible and this is the preferred pattern.
Comment 1 Chris Dumez 2013-02-18 04:44:03 PST
Created attachment 188851 [details]
Patch
Comment 2 Carlos Garcia Campos 2013-02-18 05:14:30 PST
I agree with this change, but note that Martin was opposed to it, see the discussion in bug https://bugs.webkit.org/show_bug.cgi?id=82082.
Comment 3 Chris Dumez 2013-02-18 05:18:22 PST
(In reply to comment #2)
> I agree with this change, but note that Martin was opposed to it, see the discussion in bug https://bugs.webkit.org/show_bug.cgi?id=82082.

Ok, clearing commit flag for now then. I assumed this was fine because GOwnPtr is already used this way in getRawCookies() and deleteCookie().

We should be consistent (either way). We have 2 functions uses GOwnPtr and 2 using soup_cookie_free(). I'll wait for Martin to comment on this.
Comment 4 Chris Dumez 2013-02-18 09:27:53 PST
Comment on attachment 188851 [details]
Patch

Based on IRC discussion with Martin Robinson, I'll upload a patch harmonizing the other way around (freeing explicitly).
Comment 5 Chris Dumez 2013-02-18 09:35:02 PST
Created attachment 188908 [details]
Patch
Comment 6 WebKit Review Bot 2013-02-18 11:03:04 PST
Comment on attachment 188908 [details]
Patch

Clearing flags on attachment: 188908

Committed r143243: <http://trac.webkit.org/changeset/143243>
Comment 7 WebKit Review Bot 2013-02-18 11:03:09 PST
All reviewed patches have been landed.  Closing bug.