Bug 68111

Summary: Address lifetime issues in OfflineAudioDestinationNode (take 2)
Product: WebKit Reporter: Chris Rogers <crogers>
Component: New BugsAssignee: Chris Rogers <crogers>
Status: RESOLVED FIXED    
Severity: Normal CC: kbr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch kbr: review+

Description Chris Rogers 2011-09-14 13:25:37 PDT
Address Address lifetime issues in OfflineAudioDestinationNode (take 2)
Comment 1 Chris Rogers 2011-09-14 13:27:32 PDT
Created attachment 107384 [details]
Patch
Comment 2 Chris Rogers 2011-09-14 13:31:42 PDT
my previous patch was incorrect:
http://trac.webkit.org/changeset/94984

It's too late to call waitForThreadCompletion() in the destructor, since there's could still be a pending callOnMainThread() using this object.

The object must stay alive longer.  The approach taken with this new patch is to take a reference just before the worker thread is created, then release the reference once the callOnMainThread() handler has finished.  Then we can avoid calling waitForThreadCompletion()
Comment 3 Chris Rogers 2011-09-14 13:43:59 PDT
Created attachment 107388 [details]
Patch
Comment 4 Kenneth Russell 2011-09-14 14:20:30 PDT
Comment on attachment 107388 [details]
Patch

Looks good to me.
Comment 5 Chris Rogers 2011-09-14 14:38:37 PDT
Committed r95124: <http://trac.webkit.org/changeset/95124>