| Index: Source/core/platform/audio/HRTFDatabaseLoader.cpp
|
| diff --git a/Source/core/platform/audio/HRTFDatabaseLoader.cpp b/Source/core/platform/audio/HRTFDatabaseLoader.cpp
|
| index 32b7128aadeafa5763a456bd85fff30a5933d4c1..47219ec6365a10ad63685df1a0bf1223465a2060 100644
|
| --- a/Source/core/platform/audio/HRTFDatabaseLoader.cpp
|
| +++ b/Source/core/platform/audio/HRTFDatabaseLoader.cpp
|
| @@ -45,7 +45,7 @@ PassRefPtr<HRTFDatabaseLoader> HRTFDatabaseLoader::createAndLoadAsynchronouslyIf
|
| ASSERT(isMainThread());
|
|
|
| RefPtr<HRTFDatabaseLoader> loader;
|
| -
|
| +
|
| if (!s_loaderMap)
|
| s_loaderMap = adoptPtr(new LoaderMap()).leakPtr();
|
|
|
| @@ -104,7 +104,7 @@ void HRTFDatabaseLoader::loadAsynchronously()
|
| ASSERT(isMainThread());
|
|
|
| MutexLocker locker(m_threadLock);
|
| -
|
| +
|
| if (!m_hrtfDatabase.get() && !m_databaseLoaderThread) {
|
| // Start the asynchronous database loading process.
|
| m_databaseLoaderThread = createThread(databaseLoaderEntry, this, "HRTF database loader");
|
| @@ -119,7 +119,7 @@ bool HRTFDatabaseLoader::isLoaded() const
|
| void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
|
| {
|
| MutexLocker locker(m_threadLock);
|
| -
|
| +
|
| // waitForThreadCompletion() should not be called twice for the same thread.
|
| if (m_databaseLoaderThread)
|
| waitForThreadCompletion(m_databaseLoaderThread);
|
|
|