<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>94783</bug_id>
          
          <creation_ts>2012-08-22 23:57:20 -0700</creation_ts>
          <short_desc>[WK2][LEAK] Cross reference between WebContext and WebProcessProxy</short_desc>
          <delta_ts>2012-08-24 17:45:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>94697</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kangil Han">kangil.han</reporter>
          <assigned_to name="Kangil Han">kangil.han</assigned_to>
          <cc>ap</cc>
    
    <cc>cgarcia</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>702744</commentid>
    <comment_count>0</comment_count>
    <who name="Kangil Han">kangil.han</who>
    <bug_when>2012-08-22 23:57:20 -0700</bug_when>
    <thetext>WebContext has &apos;1:N&apos; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>703078</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-23 09:31:01 -0700</bug_when>
    <thetext>The loop is broken by WebContext::disconnectProcess().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>703808</commentid>
    <comment_count>2</comment_count>
    <who name="Kangil Han">kangil.han</who>
    <bug_when>2012-08-23 23:26:46 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; The loop is broken by WebContext::disconnectProcess().

Yes and before it we have &apos;WebProcessProxy::disconnect&apos;.
However, the problem I described is, WebProcessProxy couldn&apos;t trigger WebContext::disconnectProcess() on normal exit because it has no interface with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>704124</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-24 08:33:47 -0700</bug_when>
    <thetext>WebProcessProxy::disconnect() is executed on a message from WebProcess (ShouldTerminate).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>704550</commentid>
    <comment_count>4</comment_count>
    <who name="Kangil Han">kangil.han</who>
    <bug_when>2012-08-24 17:21:20 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; WebProcessProxy::disconnect() is executed on a message from WebProcess (ShouldTerminate).

Yes and before it there is &apos;ChildProcess::terminationTimerFired()&apos;.
But, it seems not to be triggered on normal exit.
It seems we don&apos;t have any IPC connection even if it is triggered because UI process already quit connection.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>704554</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-24 17:24:04 -0700</bug_when>
    <thetext>It&apos;s possible that it&apos;s not called on exit. Why do you want to spend extra time on cleanup during UI process exit?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>704559</commentid>
    <comment_count>6</comment_count>
    <who name="Kangil Han">kangil.han</who>
    <bug_when>2012-08-24 17:34:54 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; It&apos;s possible that it&apos;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&apos;t have any WK2 interface for it.
Therefore, I would like to discuss for this and do fix if you would like it. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>704567</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-24 17:45:21 -0700</bug_when>
    <thetext>That&apos;s probably worth discussing on webkit-dev first. We&apos;ve said &quot;no&quot; to similar efforts before, since that&apos;s a lot of work and long-term liability for marginal benefit.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>