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

Unified Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp

Issue 2959663002: Repost offline rendering task if GC prevents. (Closed)
Patch Set: do want to try-lock Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« 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