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

Unified Diff: third_party/WebKit/Source/modules/webaudio/ConvolverNode.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/ConvolverNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h
index b87197ece9675be86781a1b5b78d01dc59b51dff..90857b3f8c424653680cdba1ad4d123cdcfb51ac 100644
--- a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h
@@ -63,7 +63,8 @@ class MODULES_EXPORT ConvolverHandler final : public AudioHandler {
std::unique_ptr<Reverb> m_reverb;
// This Persistent doesn't make a reference cycle including the owner
// ConvolverNode.
- Persistent<AudioBuffer> m_buffer;
+ // It is cross-thread, as it will be accessed by the audio and main threads.
+ CrossThreadPersistent<AudioBuffer> m_buffer;
// This synchronizes dynamic changes to the convolution impulse response with
// process().

Powered by Google App Engine
This is Rietveld 408576698