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 e15549cfc9453e021b4c8eab71a605d00e807af4..eafe4053bb6948bfc5a9ca808171a694ae5ea92b 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp |
@@ -182,8 +182,14 @@ void OfflineAudioDestinationHandler::DoOfflineRendering() { |
// already held, simply delay rendering until the next quantum. |
CrossThreadPersistentRegion::LockScope gc_lock( |
ProcessHeap::GetCrossThreadPersistentRegion(), true); |
- if (!gc_lock.HasLock()) |
+ if (!gc_lock.HasLock()) { |
+ // To ensure that the rendering step eventually happens, repost. |
+ render_thread_->GetWebTaskRunner()->PostTask( |
+ BLINK_FROM_HERE, |
+ Bind(&OfflineAudioDestinationHandler::DoOfflineRendering, |
+ WrapPassRefPtr(this))); |
return; |
+ } |
number_of_channels = render_target_->numberOfChannels(); |
destinations.ReserveInitialCapacity(number_of_channels); |