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

Unified Diff: third_party/WebKit/Source/modules/webaudio/PannerNode.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/PannerNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.h b/third_party/WebKit/Source/modules/webaudio/PannerNode.h
index 8d90c8a960e243d6c7bd6b506410899e085efe10..7e2a1f90ea2bf8a20ef9ef4023bb750d541782ef 100644
--- a/third_party/WebKit/Source/modules/webaudio/PannerNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.h
@@ -158,8 +158,8 @@ class PannerHandler final : public AudioHandler {
void updateDirtyState();
// This Persistent doesn't make a reference cycle including the owner
- // PannerNode.
- Persistent<AudioListener> m_listener;
+ // PannerNode. It is accessed by both audio and main thread.
+ CrossThreadPersistent<AudioListener> m_listener;
std::unique_ptr<Panner> m_panner;
unsigned m_panningModel;
unsigned m_distanceModel;

Powered by Google App Engine
This is Rietveld 408576698