RESOLVED WONTFIX 16606
[Gtk] Clean up WebKitWebFrame initialization code
https://bugs.webkit.org/show_bug.cgi?id=16606
Summary [Gtk] Clean up WebKitWebFrame initialization code
Christian Dywan
Reported 2007-12-25 11:30:07 PST
There is no initialization code in webkit_web_frame_init. Also webkit_web_frame_new and webkit_web_frame_init_with_web_view contain very similar code that can be merged. Furthermore webkit_web_frame_init_with_web_view is misnamed.
Attachments
Cleanup and renaming (4.89 KB, patch)
2007-12-25 11:38 PST, Christian Dywan
no flags
updated (4.87 KB, patch)
2007-12-30 11:51 PST, Christian Dywan
no flags
Christian Dywan
Comment 1 2007-12-25 11:38:36 PST
Created attachment 18111 [details] Cleanup and renaming Rename webkit_web_frame_init_with_web_view to webkit_web_frame_new_with_element. Cleanup initialization code in webkit_web_frame_init, webkit_web_frame_new and webkit_web_frame_new_with_element.
Alp Toker
Comment 2 2007-12-29 23:54:24 PST
- frameView->deref(); What's this change for?
Xan Lopez
Comment 3 2007-12-30 04:54:40 PST
+ frameData->name = 0; + frameData->title = 0; + frameData->uri = 0; FWIW, this is redundant. Private data is zeroed when created already.
Christian Dywan
Comment 4 2007-12-30 11:51:50 PST
Created attachment 18196 [details] updated
Christian Dywan
Comment 5 2008-01-03 23:09:28 PST
Comment on attachment 18196 [details] updated Clearing review in favor of a bit more investigation.
Leonid Romanov
Comment 6 2008-01-15 11:35:07 PST
Recently, I've been investigating where and how WebKitWebFrame instance created by FrameLoaderClient::createFrame() method gets freed. Someone on irc, where I looked for help, has asked me to report my findings here, on bugzilla. So, here we go. I used RefDbg tool to trace GObjects creation/refs/derefs/finalization and according to it, the only WebKitWebFrame instance that gets freed is the main frame. Other frames, created via webkit_web_frame_init_with_web_view are never freed. Here what I did: - Download and compile RefDbg from http://refdbg.sourceforge.net/ - Compile debug version of WebKit GTK - Start GtkLauncher under RefDbg with http://www.w3schools.com/html/tryit.asp?filename=tryhtml_frame_cols as page to open - Wait till page fully loads and then close GtkLauncher. - Examine RefDbg log for leaks
Martin Robinson
Comment 7 2010-11-27 09:25:24 PST
I just ran this test in a recent build of GtkLauncher. I couldn't get RefDbg working, so I just put print statements in the WebKitWebFrame finalization method. If I quit GtkLauncher on the test page, there were many frames that were not finalized, but if I left the page for a blank page before exiting (by accessing a non-existent address), only the main frame was not finalized. This doesn't appear to be an issue any longer.
Chris Leonard
Comment 8 2012-03-26 20:53:29 PDT
Can it be conformed whether or not thsi is still a current issue and if not can this ticket be clsoed?
Martin Robinson
Comment 9 2012-03-28 10:37:51 PDT
(In reply to comment #8) > Can it be conformed whether or not thsi is still a current issue and if not can this ticket be clsoed? Well, the original bug isn't about the RefDbg issue you mentioned in comment #6, so do you mean the original cleanup or the issue you mentioned?
Martin Robinson
Comment 10 2014-04-08 17:53:56 PDT
WebKit1GTK+ has been removed.
Note You need to log in before you can comment on or make changes to this bug.