Bug 94783 - [WK2][LEAK] Cross reference between WebContext and WebProcessProxy
Summary: [WK2][LEAK] Cross reference between WebContext and WebProcessProxy
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Kangil Han
URL:
Keywords:
Depends on:
Blocks: 94697
  Show dependency treegraph
 
Reported: 2012-08-22 23:57 PDT by Kangil Han
Modified: 2012-08-24 17:45 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kangil Han 2012-08-22 23:57:20 PDT
WebContext has '1:N' cross reference with WebProcessProxy.
To delete those objects on finalization, it seems WebProcessProxy should notify itself to WebContext as an object could be deleted.
However, there seem to be no interface under usual circumstances except forced termination, i.e. timeout and crash.
Comment 1 Alexey Proskuryakov 2012-08-23 09:31:01 PDT
The loop is broken by WebContext::disconnectProcess().
Comment 2 Kangil Han 2012-08-23 23:26:46 PDT
(In reply to comment #1)
> The loop is broken by WebContext::disconnectProcess().

Yes and before it we have 'WebProcessProxy::disconnect'.
However, the problem I described is, WebProcessProxy couldn't trigger WebContext::disconnectProcess() on normal exit because it has no interface with it.
Comment 3 Alexey Proskuryakov 2012-08-24 08:33:47 PDT
WebProcessProxy::disconnect() is executed on a message from WebProcess (ShouldTerminate).
Comment 4 Kangil Han 2012-08-24 17:21:20 PDT
(In reply to comment #3)
> WebProcessProxy::disconnect() is executed on a message from WebProcess (ShouldTerminate).

Yes and before it there is 'ChildProcess::terminationTimerFired()'.
But, it seems not to be triggered on normal exit.
It seems we don't have any IPC connection even if it is triggered because UI process already quit connection.
Comment 5 Alexey Proskuryakov 2012-08-24 17:24:04 PDT
It's possible that it's not called on exit. Why do you want to spend extra time on cleanup during UI process exit?
Comment 6 Kangil Han 2012-08-24 17:34:54 PDT
(In reply to comment #5)
> It's possible that it's not called on exit. Why do you want to spend extra time on cleanup during UI process exit?

I am interested in cleaning WebContext on exit.
What I have described in the bug is that I think we don't have any WK2 interface for it.
Therefore, I would like to discuss for this and do fix if you would like it. :-)
Comment 7 Alexey Proskuryakov 2012-08-24 17:45:21 PDT
That's probably worth discussing on webkit-dev first. We've said "no" to similar efforts before, since that's a lot of work and long-term liability for marginal benefit.