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

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

Issue 666213003: HRTFDatabaseLoader needs to acquire a lock when accessing m_hrtfDatabase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Source/platform/audio/HRTFDatabaseLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/audio/HRTFDatabaseLoader.h
diff --git a/Source/platform/audio/HRTFDatabaseLoader.h b/Source/platform/audio/HRTFDatabaseLoader.h
index 73dac33ba43636627fe6ceae96aeee30b534abda..27d001788ba2575f3819ccea81114146b29c312a 100644
--- a/Source/platform/audio/HRTFDatabaseLoader.h
+++ b/Source/platform/audio/HRTFDatabaseLoader.h
@@ -51,7 +51,7 @@ public:
~HRTFDatabaseLoader();
// Returns true once the default database has been completely loaded.
- bool isLoaded() const;
+ bool isLoaded();
// waitForLoaderThreadCompletion() may be called more than once and is thread-safe.
void waitForLoaderThreadCompletion();
@@ -73,10 +73,10 @@ private:
// This must be called from the main thread.
void loadAsynchronously();
+ // Holding a m_lock is required when accessing m_hrtfDatabase since we access it from multiple threads.
+ Mutex m_lock;
OwnPtr<HRTFDatabase> m_hrtfDatabase;
- // Holding a m_threadLock is required when accessing m_databaseLoaderThread since we access it from multiple threads.
- Mutex m_threadLock;
OwnPtr<WebThread> m_databaseLoaderThread;
float m_databaseSampleRate;
« no previous file with comments | « no previous file | Source/platform/audio/HRTFDatabaseLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698