[webkit-dev] [WK2] WebContext destructor is never triggered on normal exit

Sam Weinig weinig at apple.com
Mon Aug 27 20:03:19 PDT 2012

I see.  Then what I said was right, you just need to release your WKContextRef when exiting your minibrowser.  This should not be changed in WebKit.


On Aug 27, 2012, at 8:02 PM, Kangil Han <kangil.han at samsung.com> wrote:

> I hope below bug url would help your understanding.
> https://bugs.webkit.org/show_bug.cgi?id=94783
> My query was from finding ‘LEAK’ on WebContext that is supposed being triggered from ‘WTF::RefCountedLeakCounter’ automatically when exit minibrowser.
> I have investigated little bit further and found WebContext would be freed by WebProcessProxy which depends on WebProcess.
> As Alexey described in that bug, we would gain little compared to efforts.
> However, I think ignoring destructor call and see the ‘LEAK’ print out message at every time I exit program on debug build would not be so nice.
> That’s why I’ve asked here for hearing opinions. :)
> - kangil
> From: Sam Weinig [mailto:weinig at apple.com] 
> Sent: Sunday, August 26, 2012 8:36 AM
> To: kangil.han at samsung.com
> Cc: webkit-dev at lists.webkit.org
> Subject: Re: [webkit-dev] [WK2] WebContext destructor is never triggered on normal exit
> I'm not clear on what you mean.  A client of WebKit2 release their WKContextRef pointer from atexit() if they wanted to (or in whatever other termination routines they already have), but its not clear to me why the framework should do it for them.  We don't do this for any other objects.
> -Sam
> On Aug 24, 2012, at 7:15 PM, Kangil Han <kangil.han at samsung.com> wrote:
> Hi,
> I’ve found WebContext destructor is never triggered on normal exit in WK2.
> This happens because only IPC message from WebProcess could terminate it but won’t do that in this case.
> One possibility for doing this is to create a flow of termination from UIProcess on exit.
> But, before starting investigation, I would like to ask your opinion.
> kangil
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120827/f11c2b95/attachment-0001.html>

More information about the webkit-dev mailing list