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

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

Issue 314113008: Oilpan: have MediaController weakly refer to its media elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add FIXME (crbug.com/383072) Created 6 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
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/MediaController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 3b781bf062425814208b18e67bcd5c3da9712c68..f7cd712345cce429982e9826428ff6e0335df742 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -325,12 +325,12 @@ HTMLMediaElement::~HTMLMediaElement()
#if !ENABLE(OILPAN)
if (m_textTracks)
m_textTracks->clearOwner();
-#endif
if (m_mediaController) {
m_mediaController->removeMediaElement(this);
m_mediaController = nullptr;
}
+#endif
closeMediaSource();
@@ -3512,7 +3512,7 @@ MediaController* HTMLMediaElement::controller() const
return m_mediaController.get();
}
-void HTMLMediaElement::setController(PassRefPtr<MediaController> controller)
+void HTMLMediaElement::setController(PassRefPtrWillBeRawPtr<MediaController> controller)
{
// 4.8.10.11.2 Media controllers: controller attribute.
// On setting, it must first remove the element's mediagroup attribute, if any,
@@ -3521,7 +3521,7 @@ void HTMLMediaElement::setController(PassRefPtr<MediaController> controller)
setControllerInternal(controller);
}
-void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> controller)
+void HTMLMediaElement::setControllerInternal(PassRefPtrWillBeRawPtr<MediaController> controller)
{
if (m_mediaController)
m_mediaController->removeMediaElement(this);
@@ -3656,6 +3656,7 @@ void HTMLMediaElement::trace(Visitor* visitor)
visitor->trace(m_nextChildNodeToConsider);
visitor->trace(m_textTracks);
visitor->trace(m_textTracksWhenResourceSelectionBegan);
+ visitor->trace(m_mediaController);
WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor);
HTMLElement::trace(visitor);
}
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/MediaController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698