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

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

Issue 2702243003: Disallow cross-thread Persistent<> read access. (Closed)
Patch Set: rebase fixup 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/MediaElementAudioSourceNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h
index 1a855674e3858ac78d6fbcf21f5514fbcfbc8e8a..40330eac4058a90f0b486c835c20c92722a9593e 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h
@@ -45,7 +45,7 @@ class MediaElementAudioSourceHandler final : public AudioHandler {
HTMLMediaElement&);
~MediaElementAudioSourceHandler() override;
- HTMLMediaElement* mediaElement() { return m_mediaElement.get(); }
+ HTMLMediaElement* mediaElement() const;
// AudioHandler
void dispose() override;
@@ -76,7 +76,9 @@ class MediaElementAudioSourceHandler final : public AudioHandler {
// This Persistent doesn't make a reference cycle. The reference from
// HTMLMediaElement to AudioSourceProvideClient, which
// MediaElementAudioSourceNode implements, is weak.
- Persistent<HTMLMediaElement> m_mediaElement;
+ //
+ // It is accessed by both audio and main thread.
+ CrossThreadPersistent<HTMLMediaElement> m_mediaElement;
haraken 2017/02/20 23:57:18 Ditto.
Mutex m_processLock;
unsigned m_sourceNumberOfChannels;

Powered by Google App Engine
This is Rietveld 408576698