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

Unified Diff: Source/modules/webaudio/AudioScheduledSourceNode.h

Issue 1256053006: Protect AudioScheduledSoureNode::m_startTime and m_endTime. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert change to OscillatorNode.cpp Created 5 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
Index: Source/modules/webaudio/AudioScheduledSourceNode.h
diff --git a/Source/modules/webaudio/AudioScheduledSourceNode.h b/Source/modules/webaudio/AudioScheduledSourceNode.h
index 11c3e5196ff65c116e8ad6e1ebc1b4e48cf37065..9e36c1bea247142efff9e7b1b4e17db306b3534b 100644
--- a/Source/modules/webaudio/AudioScheduledSourceNode.h
+++ b/Source/modules/webaudio/AudioScheduledSourceNode.h
@@ -103,6 +103,10 @@ protected:
void notifyEnded();
+ // This synchronizes with process() and any other method that needs to be synchronized like
+ // setBuffer for AudioBufferSource.
+ mutable Mutex m_processLock;
+
// m_startTime is the time to start playing based on the context's timeline (0 or a time less than the context's current time means "now").
double m_startTime; // in seconds
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.cpp ('k') | Source/modules/webaudio/AudioScheduledSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698