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

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

Issue 1405413004: Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarifying error messages in layout tests Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
index cba5a99247ab2929a07aae6107dbb4a70cfee023..bf47d8939c96665a49fa4877377e57e79906f34b 100644
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
@@ -60,6 +60,16 @@ void DeferredTaskHandler::unlock()
m_contextGraphMutex.unlock();
}
+void DeferredTaskHandler::offlineLock()
+{
+ // It is safe to lock the audio thread for offline rendering, but
+ // let us have RELEASE_ASSERT here to make sure to explicitly crash rather
+ // than accidentally blocking the audio thread.
+ RELEASE_ASSERT(isAudioThread());
Raymond Toy 2015/10/21 18:22:45 Maybe use RELEASE_ASSERT_WITH_MESSAGE so a simple
hongchan 2015/10/22 18:23:48 Done.
+
+ m_contextGraphMutex.lock();
+}
+
#if ENABLE(ASSERT)
bool DeferredTaskHandler::isGraphOwner()
{

Powered by Google App Engine
This is Rietveld 408576698