Bug 23697 - Leaks seen on Worker tests
Summary: Leaks seen on Worker tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-02 14:01 PST by Alexey Proskuryakov
Modified: 2009-02-02 22:40 PST (History)
1 user (show)

See Also:


Attachments
proposed fix (1.25 KB, patch)
2009-02-02 14:06 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2009-02-02 14:01:12 PST
See e.g. <http://build.webkit.org/results/trunk-mac-intel-debug/5945/DumpRenderTree2-leaks.txt>.

I have a fix, patch forthcoming.
Comment 1 Alexey Proskuryakov 2009-02-02 14:06:11 PST
Created attachment 27260 [details]
proposed fix

The issue turned out to be much simpler than I thought.
Comment 2 David Levin 2009-02-02 14:31:28 PST
Interesting.  Looks good to me (but I'm not a reviewer so it doesn'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't really accurate anymore.  Really, the worker thread no longer exists at this point.

Comment 3 Darin Adler 2009-02-02 14:40:17 PST
Comment on attachment 27260 [details]
proposed fix

r=me
Comment 4 Alexey Proskuryakov 2009-02-02 22:40:01 PST
Committed revision 40523. I've removed the obsolete comment - thanks Dave!