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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 2d9f3b45306f45be6be9af5196925884eedb2d14..59ec313479d5ee3100f21ca36dafafa2cc016bcf 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -1650,7 +1650,7 @@ void HTMLMediaElement::setReadyState(ReadyState state)
if (!isGestureNeededForPlayback()) {
if (isHTMLVideoElement() && muted() && RuntimeEnabledFeatures::autoplayMutedVideosEnabled()) {
- m_autoplayVisibilityObserver = new ElementVisibilityObserver(this, WTF::bind(&HTMLMediaElement::onVisibilityChangedForAutoplay, this));
+ m_autoplayVisibilityObserver = new ElementVisibilityObserver(this, WTF::bind(&HTMLMediaElement::onVisibilityChangedForAutoplay, wrapPersistent(this)));
m_autoplayVisibilityObserver->start();
} else {
m_paused = false;
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698