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

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

Issue 331623002: Oilpan: Prepare to move EventQueue and its subclasses to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index af3e44e4494d0448e89dc1b8aefb4295c0965312..f8a7bc6f15f0886d6b044e344b0972e863558a18 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -303,8 +303,6 @@ HTMLMediaElement::~HTMLMediaElement()
{
WTF_LOG(Media, "HTMLMediaElement::~HTMLMediaElement");
- m_asyncEventQueue->close();
-
#if ENABLE(OILPAN)
// If the HTMLMediaElement dies with the document we are not
// allowed to touch the document to adjust delay load event counts
@@ -319,10 +317,13 @@ HTMLMediaElement::~HTMLMediaElement()
if (ActiveDOMObject::executionContext())
setShouldDelayLoadEvent(false);
#else
+ // HTMLMediaElement and m_asyncEventQueue always become unreachable
+ // together. So HTMLMediaElemenet and m_asyncEventQueue are destructed in
+ // the same GC. We don't need to close it explicitly in Oilpan.
+ m_asyncEventQueue->close();
+
setShouldDelayLoadEvent(false);
-#endif
-#if !ENABLE(OILPAN)
if (m_textTracks)
m_textTracks->clearOwner();
@@ -3651,6 +3652,7 @@ void HTMLMediaElement::defaultEventHandler(Event* event)
void HTMLMediaElement::trace(Visitor* visitor)
{
+ visitor->trace(m_asyncEventQueue);
visitor->trace(m_error);
visitor->trace(m_currentSourceNode);
visitor->trace(m_nextChildNodeToConsider);

Powered by Google App Engine
This is Rietveld 408576698