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 b7e55de0e324a5bfb438dc4108f89d9bb1f06519..08a748884849b175b2db7d0d74e583f10c3396fd 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
@@ -279,5 +279,16 @@ void DeferredTaskHandler::clearHandlersToBeDeleted() |
m_deletableOrphanHandlers.clear(); |
} |
+void DeferredTaskHandler::setAudioThreadToCurrentThread() |
+{ |
+ ASSERT(!isMainThread()); |
+ if (m_audioThread) { |
+ ASSERT(m_audioThread == currentThread()); |
+ return; |
+ } |
+ ThreadIdentifier thread = currentThread(); |
+ releaseStore(&m_audioThread, thread); |
+} |
+ |
} // namespace blink |