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

Unified Diff: third_party/WebKit/Source/modules/webaudio/OscillatorNode.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/OscillatorNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
index bc8df7236c01012999437172d2114fcdd1b1d46e..207e2dd565250a6a289343628830e162738f4f18 100644
--- a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
@@ -96,8 +96,9 @@ class OscillatorHandler final : public AudioScheduledSourceHandler {
AudioFloatArray m_detuneValues;
// This Persistent doesn't make a reference cycle including the owner
- // OscillatorNode.
- Persistent<PeriodicWave> m_periodicWave;
+ // OscillatorNode. It is cross-thread, as it will be accessed by the audio
+ // thread.
+ CrossThreadPersistent<PeriodicWave> m_periodicWave;
};
class OscillatorNode final : public AudioScheduledSourceNode {

Powered by Google App Engine
This is Rietveld 408576698