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

Kangil Han kangil.han at samsung.com
Mon Aug 27 21:32:41 PDT 2012


I hope so, but it seems not to be easy one because WebProcessProxy has a
reference to WebContext and it would only be released by IPC message from
WebProcess.
 
- kangil
 
From: Sam Weinig [mailto:weinig at apple.com] 
Sent: Tuesday, August 28, 2012 12:03 PM
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 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.
 
-Sam
 
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>
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 < <mailto:kangil.han at samsung.com>
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
 <mailto:webkit-dev at lists.webkit.org> webkit-dev at lists.webkit.org
 <http://lists.webkit.org/mailman/listinfo/webkit-dev>
http://lists.webkit.org/mailman/listinfo/webkit-dev
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120828/e6f0d18d/attachment.html>


More information about the webkit-dev mailing list