Summary: | [GTK] BackForward history leak? | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alp Toker <alp> | ||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | jmalonzo | ||||||
Priority: | P2 | Keywords: | Gtk | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Alp Toker
2008-06-12 18:21:06 PDT
Alp, Should we also look at other areas of webkit/gtk? Created attachment 22678 [details]
Refactor WebKitWebBackForwardList and leak fixes
This patch refactors WebKitWebBackForwardList as well as fixes possible leaks of WebKitWebHistoryItems. This also fixes the documentation wrt when to free and when not to free return values.
Comment on attachment 22678 [details] Refactor WebKitWebBackForwardList and leak fixes I would encourage you to read: http://webkit.org/coding/RefPtr.html Methods shouldn't return RefPtr. Possibly "const RefPtr&" , but in that case "Class*" is almost always better. We also don't keep PassRefPtrs on the stack. If you need more clarification about RefPtr design, I encourage you to read that document or ask in #webkit. (or read some of hte other gtk bugs I've recently reviewed). Created attachment 28442 [details]
Don't ref items when returning a back/forward list
Don't ref the returned items to be consistent with the rest of the API. Also a added a test case to verify this.
Comment on attachment 28442 [details]
Don't ref items when returning a back/forward list
Okay, a change in behaviour but I assume the reality is that this just leaked in midori/epi? Thanks for adding a test. The only thing to change is probably the static void\nMETHOD_NAME as this is inconsistent with the rest of the file.
|