Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp |
| index e35b087652e1663a338b77707488110927f8aae1..423a588ee4519e1b26295eb69422babd01a983da 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp |
| @@ -46,8 +46,6 @@ OfflineAudioDestinationHandler::OfflineAudioDestinationHandler( |
| AudioBuffer* render_target) |
| : AudioDestinationHandler(node), |
| render_target_(render_target), |
| - render_thread_( |
| - Platform::Current()->CreateThread("offline audio renderer")), |
| frames_processed_(0), |
| frames_to_process_(0), |
| is_rendering_started_(false), |
| @@ -104,12 +102,14 @@ unsigned long OfflineAudioDestinationHandler::MaxChannelCount() const { |
| void OfflineAudioDestinationHandler::StartRendering() { |
| DCHECK(IsMainThread()); |
| - DCHECK(render_thread_); |
| DCHECK(render_target_); |
| if (!render_target_) |
| return; |
| + render_thread_ = Platform::Current()->CreateThread("offline audio renderer"); |
|
Raymond Toy
2017/05/19 19:37:54
Maybe if we fail to create the thread we can rejec
|
| + DCHECK(render_thread_); |
| + |
| // Rendering was not started. Starting now. |
| if (!is_rendering_started_) { |
| is_rendering_started_ = true; |