[Webkit-unassigned] [Bug 141641] [GTK] WebKitFrame objects are never released
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 16 08:28:04 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=141641
--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #2)
> Comment on attachment 246647 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=246647&action=review
>
> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:81
> > +class WebKitFrameWrapper final: public FrameDestructionObserver {
>
> I wonder if it makes sense to simply add the FrameDestructionObserver as a
> member of WebKitFrame? I worry about the possibility of introducing
> reference cycles, by wrapping the frame itself.
There's no possibility of ref cycles, because the only reference of WebKitFrame is owned by the wrapper that is deleted when the WebCore::Frame is destroyed. That hasn't actually changed, since current the only references is owned by the WebFrameMap. The only difference is that now the WebFrameMap contains a WebKitFrameWrapper instead of a WebKitFrame directly.
The destructor is in WebKitWebPage because frames are created in WebKitWebPage, which is where the WebFrameMap is.
> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:123
> > +static void webkitFrameDestroy(WebFrame* webFrame)
> > +{
> > + webFrameMap().remove(webFrame);
>
> This should probably be called webkitFrameDestroyed or
> webkitFrameDestroyedCallback, I think. It doesn't destroy the frame, it just
> responds to the destruction.
It's confusing, it responds to a WebCore::Frame destruction to destroy the WebKitFrame object. But I agree it's confusing, webFrameDestroyed() could work better.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150216/d50e6dee/attachment-0002.html>
More information about the webkit-unassigned
mailing list