Index: Source/platform/audio/HRTFDatabaseLoader.cpp |
diff --git a/Source/platform/audio/HRTFDatabaseLoader.cpp b/Source/platform/audio/HRTFDatabaseLoader.cpp |
index dc1e083e0538398731e9c91d54db583114f23549..2ad9871a8b3bbda0a9d48eb945cb63f962ef5c98 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->defaultTaskRunner()->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->defaultTaskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(&HRTFDatabaseLoader::cleanupTask, AllowCrossThreadAccess(this), AllowCrossThreadAccess(&sync)))); |
sync.waitForTaskCompletion(); |
m_thread.clear(); |
} |