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

Unified Diff: Source/core/platform/audio/HRTFElevation.cpp

Issue 23437031: Merge 157273 "Fix threading races on HRTFElevation::audioBusMap" (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1599/
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/HRTFElevation.cpp
===================================================================
--- Source/core/platform/audio/HRTFElevation.cpp (revision 157690)
+++ Source/core/platform/audio/HRTFElevation.cpp (working copy)
@@ -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 @@
{
typedef HashMap<String, RefPtr<AudioBus> > AudioBusMap;
DEFINE_STATIC_LOCAL(AudioBusMap, audioBusMap, ());
+ DEFINE_STATIC_LOCAL(Mutex, mutex, ());
+ MutexLocker locker(mutex);
RefPtr<AudioBus> bus;
AudioBusMap::iterator iterator = audioBusMap.find(subjectName);
if (iterator == audioBusMap.end()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698