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

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

Issue 1954663002: Initialize DeferredTaskHandler's audio thread ID once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: out-of-line setter Created 4 years, 7 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 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

Powered by Google App Engine
This is Rietveld 408576698