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

Unified Diff: Source/platform/audio/HRTFDatabaseLoader.cpp

Issue 1303153005: Introduce WebTaskRunner Patch 3/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing #include Created 5 years, 3 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 | « Source/platform/WebThreadSupportingGC.cpp ('k') | Source/platform/audio/ReverbConvolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/audio/HRTFDatabaseLoader.cpp
diff --git a/Source/platform/audio/HRTFDatabaseLoader.cpp b/Source/platform/audio/HRTFDatabaseLoader.cpp
index dc1e083e0538398731e9c91d54db583114f23549..79f0576f4a83e6699c61046f033b38e2077f9167 100644
--- a/Source/platform/audio/HRTFDatabaseLoader.cpp
+++ b/Source/platform/audio/HRTFDatabaseLoader.cpp
@@ -99,7 +99,8 @@ void HRTFDatabaseLoader::loadAsynchronously()
if (!m_hrtfDatabase && !m_thread) {
// Start the asynchronous database loading process.
m_thread = adoptPtr(Platform::current()->createThread("HRTF database loader"));
- m_thread->postTask(FROM_HERE, new Task(threadSafeBind(&HRTFDatabaseLoader::loadTask, AllowCrossThreadAccess(this))));
+ // TODO(alexclarke): Should this be posted as a loading task?
+ m_thread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(&HRTFDatabaseLoader::loadTask, AllowCrossThreadAccess(this))));
}
}
@@ -122,7 +123,8 @@ void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
return;
TaskSynchronizer sync;
- m_thread->postTask(FROM_HERE, new Task(threadSafeBind(&HRTFDatabaseLoader::cleanupTask, AllowCrossThreadAccess(this), AllowCrossThreadAccess(&sync))));
+ // TODO(alexclarke): Should this be posted as a loading task?
+ m_thread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(&HRTFDatabaseLoader::cleanupTask, AllowCrossThreadAccess(this), AllowCrossThreadAccess(&sync))));
sync.waitForTaskCompletion();
m_thread.clear();
}
« no previous file with comments | « Source/platform/WebThreadSupportingGC.cpp ('k') | Source/platform/audio/ReverbConvolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698