Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: Source/WebCore/webaudio/OfflineAudioDestinationNode.cpp

Issue 8044037: Merge 96020 - OfflineAudioDestinationNode must wait for thread completion in uninitialize() (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return; 62 return;
63 63
64 AudioNode::initialize(); 64 AudioNode::initialize();
65 } 65 }
66 66
67 void OfflineAudioDestinationNode::uninitialize() 67 void OfflineAudioDestinationNode::uninitialize()
68 { 68 {
69 if (!isInitialized()) 69 if (!isInitialized())
70 return; 70 return;
71 71
72 if (m_renderThread) {
73 waitForThreadCompletion(m_renderThread, 0);
74 m_renderThread = 0;
75 }
76
72 AudioNode::uninitialize(); 77 AudioNode::uninitialize();
73 } 78 }
74 79
75 void OfflineAudioDestinationNode::startRendering() 80 void OfflineAudioDestinationNode::startRendering()
76 { 81 {
77 ASSERT(isMainThread()); 82 ASSERT(isMainThread());
78 ASSERT(m_renderTarget.get()); 83 ASSERT(m_renderTarget.get());
79 if (!m_renderTarget.get()) 84 if (!m_renderTarget.get())
80 return; 85 return;
81 86
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 165 }
161 166
162 void OfflineAudioDestinationNode::notifyComplete() 167 void OfflineAudioDestinationNode::notifyComplete()
163 { 168 {
164 context()->fireCompletionEvent(); 169 context()->fireCompletionEvent();
165 } 170 }
166 171
167 } // namespace WebCore 172 } // namespace WebCore
168 173
169 #endif // ENABLE(WEB_AUDIO) 174 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698