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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.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/AudioBufferSourceNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
index 2d2739acb3fb2b9a6e91ee3f5f90a2ae8090737b..3e506c199a59713db922e64f0fafd7ad721b84a4 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
@@ -124,7 +124,8 @@ class AudioBufferSourceHandler final : public AudioScheduledSourceHandler {
// m_buffer holds the sample data which this node outputs.
// This Persistent doesn't make a reference cycle including
// AudioBufferSourceNode.
- Persistent<AudioBuffer> m_buffer;
+ // It is cross-thread, as it will be accessed by the audio and main threads.
+ CrossThreadPersistent<AudioBuffer> m_buffer;
// Pointers for the buffer and destination.
std::unique_ptr<const float* []> m_sourceChannels;
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThread.h ('k') | third_party/WebKit/Source/modules/webaudio/ConvolverNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698