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

Unified Diff: Source/core/html/track/TextTrackList.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
« no previous file with comments | « Source/core/html/track/TextTrackList.h ('k') | Source/core/workers/WorkerEventQueue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrackList.cpp
diff --git a/Source/core/html/track/TextTrackList.cpp b/Source/core/html/track/TextTrackList.cpp
index 15df7569e1aa15364a8051a1f69b4a4f54a180fe..0738c95e7bac2388d6d0068042ba734fc8a20251 100644
--- a/Source/core/html/track/TextTrackList.cpp
+++ b/Source/core/html/track/TextTrackList.cpp
@@ -47,9 +47,12 @@ TextTrackList::~TextTrackList()
{
#if !ENABLE(OILPAN)
ASSERT(!m_owner);
-#endif
+
+ // TextTrackList and m_asyncEventQueue always become unreachable
+ // together. So TextTrackList and m_asyncEventQueue are destructed in the
+ // same GC. We don't need to close it explicitly in Oilpan.
m_asyncEventQueue->close();
haraken 2014/06/12 10:48:51 In non-oilpan builds, some destructors call close(
tkent 2014/06/12 23:50:12 I'd like to keep non-oilpan code.
-#if !ENABLE(OILPAN)
+
for (unsigned i = 0; i < length(); ++i) {
item(i)->setTrackList(0);
}
@@ -334,6 +337,7 @@ HTMLMediaElement* TextTrackList::owner() const
void TextTrackList::trace(Visitor* visitor)
{
visitor->trace(m_owner);
+ visitor->trace(m_asyncEventQueue);
visitor->trace(m_addTrackTracks);
visitor->trace(m_elementTracks);
visitor->trace(m_inbandTracks);
« no previous file with comments | « Source/core/html/track/TextTrackList.h ('k') | Source/core/workers/WorkerEventQueue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698