Index: Source/core/platform/audio/HRTFElevation.cpp |
diff --git a/Source/core/platform/audio/HRTFElevation.cpp b/Source/core/platform/audio/HRTFElevation.cpp |
index a37e696f50ed6ec52fd056bb615d41d7667a572b..a5c606cdb95535ce11d81a107c0da00fe832fcc6 100644 |
--- a/Source/core/platform/audio/HRTFElevation.cpp |
+++ b/Source/core/platform/audio/HRTFElevation.cpp |
@@ -37,6 +37,7 @@ |
#include "core/platform/audio/AudioBus.h" |
#include "core/platform/audio/HRTFPanner.h" |
#include "wtf/OwnPtr.h" |
+#include "wtf/ThreadingPrimitives.h" |
using namespace std; |
@@ -64,7 +65,9 @@ static PassRefPtr<AudioBus> getConcatenatedImpulseResponsesForSubject(const Stri |
{ |
typedef HashMap<String, RefPtr<AudioBus> > AudioBusMap; |
DEFINE_STATIC_LOCAL(AudioBusMap, audioBusMap, ()); |
+ DEFINE_STATIC_LOCAL(Mutex, mutex, ()); |
Ken Russell (switch to Gerrit)
2013/09/04 19:57:55
This doesn't look any safer to me. If there is rea
|
+ MutexLocker locker(mutex); |
RefPtr<AudioBus> bus; |
AudioBusMap::iterator iterator = audioBusMap.find(subjectName); |
if (iterator == audioBusMap.end()) { |