Title: [132259] trunk/Source/WebCore
- Revision
- 132259
- Author
- [email protected]
- Date
- 2012-10-23 14:02:54 -0700 (Tue, 23 Oct 2012)
Log Message
Fix thread safety issue in AudioParamTimeline
https://bugs.webkit.org/show_bug.cgi?id=100154
Reviewed by Kenneth Russell.
Add appropriate locking in AudioParamTimeline::valueForContextTime()
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valueForContextTime):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (132258 => 132259)
--- trunk/Source/WebCore/ChangeLog 2012-10-23 20:25:54 UTC (rev 132258)
+++ trunk/Source/WebCore/ChangeLog 2012-10-23 21:02:54 UTC (rev 132259)
@@ -1,3 +1,15 @@
+2012-10-23 Chris Rogers <[email protected]>
+
+ Fix thread safety issue in AudioParamTimeline
+ https://bugs.webkit.org/show_bug.cgi?id=100154
+
+ Reviewed by Kenneth Russell.
+
+ Add appropriate locking in AudioParamTimeline::valueForContextTime()
+
+ * Modules/webaudio/AudioParamTimeline.cpp:
+ (WebCore::AudioParamTimeline::valueForContextTime):
+
2012-10-23 Alec Flett <[email protected]>
IndexedDB: refactor backend to use IDB*Metadata
Modified: trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp (132258 => 132259)
--- trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp 2012-10-23 20:25:54 UTC (rev 132258)
+++ trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp 2012-10-23 21:02:54 UTC (rev 132259)
@@ -117,9 +117,12 @@
{
ASSERT(context);
- if (!context || !m_events.size() || context->currentTime() < m_events[0].time()) {
- hasValue = false;
- return defaultValue;
+ {
+ MutexTryLocker tryLocker(m_eventsLock);
+ if (!tryLocker.locked() || !context || !m_events.size() || context->currentTime() < m_events[0].time()) {
+ hasValue = false;
+ return defaultValue;
+ }
}
// Ask for just a single value.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes