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

Unified Diff: Source/modules/mediasource/MediaSource.cpp

Issue 1193383002: Oilpan: have media element prefinalizer handle all finalization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: move conditional closing of MediaSource to media elt prefinalizer Created 5 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/modules/mediasource/MediaSource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/MediaSource.cpp
diff --git a/Source/modules/mediasource/MediaSource.cpp b/Source/modules/mediasource/MediaSource.cpp
index 65f966f47c065588e0fff33c30fa4c5a54ea70ff..6e283691077fffaa96d1219a57c214751962732f 100644
--- a/Source/modules/mediasource/MediaSource.cpp
+++ b/Source/modules/mediasource/MediaSource.cpp
@@ -263,27 +263,14 @@ ExecutionContext* MediaSource::executionContext() const
return ActiveDOMObject::executionContext();
}
-void MediaSource::clearWeakMembers(Visitor* visitor)
-{
-#if ENABLE(OILPAN)
- // Oilpan: If the MediaSource survived, but its attached media
- // element did not, signal the element that it can safely
- // notify its MediaSource during finalization by calling close().
- if (m_attachedElement && !Heap::isHeapObjectAlive(m_attachedElement)) {
- m_attachedElement->setCloseMediaSourceWhenFinalizing();
- m_attachedElement.clear();
- }
-#endif
-}
-
DEFINE_TRACE(MediaSource)
{
#if ENABLE(OILPAN)
visitor->trace(m_asyncEventQueue);
#endif
+ visitor->trace(m_attachedElement);
visitor->trace(m_sourceBuffers);
visitor->trace(m_activeSourceBuffers);
- visitor->template registerWeakMembers<MediaSource, &MediaSource::clearWeakMembers>(this);
RefCountedGarbageCollectedEventTargetWithInlineData<MediaSource>::trace(visitor);
ActiveDOMObject::trace(visitor);
}
« no previous file with comments | « Source/modules/mediasource/MediaSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698