<?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>23697</bug_id>
          
          <creation_ts>2009-02-02 14:01:12 -0800</creation_ts>
          <short_desc>Leaks seen on Worker tests</short_desc>
          <delta_ts>2009-02-02 22:40:01 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          <cc>levin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>108034</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-02-02 14:01:12 -0800</bug_when>
    <thetext>See e.g. &lt;http://build.webkit.org/results/trunk-mac-intel-debug/5945/DumpRenderTree2-leaks.txt&gt;.

I have a fix, patch forthcoming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108036</commentid>
    <comment_count>1</comment_count>
      <attachid>27260</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-02-02 14:06:11 -0800</bug_when>
    <thetext>Created attachment 27260
proposed fix

The issue turned out to be much simpler than I thought.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108038</commentid>
    <comment_count>2</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2009-02-02 14:31:28 -0800</bug_when>
    <thetext>Interesting.  Looks good to me (but I&apos;m not a reviewer so it doesn&apos;t matter).

The key thing to note is that workerContextDestroyedInternal may get called due to a posted task before the worker object is destroyed.  Then when the worker object is destroyed later, it should call workerContextDestroyedInternal(); to do the final clean up.

One issue the comment in WorkerMessagingProxy::workerObjectDestroyed()

        workerContextDestroyedInternal(); // It never existed, just do our cleanup.

isn&apos;t really accurate anymore.  Really, the worker thread no longer exists at this point.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108040</commentid>
    <comment_count>3</comment_count>
      <attachid>27260</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-02-02 14:40:17 -0800</bug_when>
    <thetext>Comment on attachment 27260
proposed fix

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108087</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-02-02 22:40:01 -0800</bug_when>
    <thetext>Committed revision 40523. I&apos;ve removed the obsolete comment - thanks Dave!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>27260</attachid>
            <date>2009-02-02 14:06:11 -0800</date>
            <delta_ts>2009-02-02 14:40:17 -0800</delta_ts>
            <desc>proposed fix</desc>
            <filename>WorkerLeak.txt</filename>
            <type>text/plain</type>
            <size>1283</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0MDQ5MSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA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ZXN0cm95ZWRUYXNrIGlzIGFsd2F5cyB0aGUgbGFzdCB0
byBiZSBwZXJmb3JtZWQsIHNvIHRoZSBwcm94eSBpcyBub3QgbmVlZGVkIGZvciBjb21tdW5pY2F0
aW9uCiAgICAgLy8gaW4gZWl0aGVyIHNpZGUgYW55IG1vcmUuIEhvd2V2ZXIsIHRoZSBXb3JrZXIg
b2JqZWN0IG1heSBzdGlsbCBleGlzdCwgYW5kIGl0IGFzc3VtZXMgdGhhdCB0aGUgcHJveHkgZXhp
c3RzLCB0b28uCisgICAgbV93b3JrZXJUaHJlYWQgPSAwOwogICAgIGlmICghbV93b3JrZXJPYmpl
Y3QpCiAgICAgICAgIGRlbGV0ZSB0aGlzOwogfQo=
</data>
<flag name="review"
          id="13135"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>