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

Unified Diff: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h

Issue 2702243003: Disallow cross-thread Persistent<> read access. (Closed)
Patch Set: rebased upto r451733 Created 3 years, 10 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: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h
index a987ff3d6f26ac1f7d30254c058d8bd0e2462079..499ca1f0e8f7226d650bfc658fd00dd43637e086 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h
@@ -58,7 +58,10 @@ class MediaStreamAudioDestinationHandler final
// This Persistent doesn't make a reference cycle.
Persistent<MediaStream> m_stream;
- Persistent<MediaStreamSource> m_source;
+ // Accessed by main thread and during audio thread processing.
+ //
+ // TODO: try to avoid such access during audio thread processing.
+ CrossThreadPersistent<MediaStreamSource> m_source;
// This synchronizes dynamic changes to the channel count with
// process() to manage the mix bus.

Powered by Google App Engine
This is Rietveld 408576698