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

Unified Diff: Source/modules/encryptedmedia/MediaKeySession.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/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeySession.cpp b/Source/modules/encryptedmedia/MediaKeySession.cpp
index 28101cc1ba78be64fa61952a187fc2b58d656ec4..0bc78cb793a0b1449f5fb572456218ac84acdc2b 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -84,7 +84,12 @@ MediaKeySession::MediaKeySession(ExecutionContext* context, blink::WebContentDec
MediaKeySession::~MediaKeySession()
{
m_session.clear();
+#if !ENABLE(OILPAN)
+ // MediaKeySession and m_asyncEventQueue always become unreachable
+ // together. So MediaKeySession and m_asyncEventQueue are destructed in the
+ // same GC. We don't need to call cancelAllEvents explicitly in Oilpan.
m_asyncEventQueue->cancelAllEvents();
+#endif
}
void MediaKeySession::setError(MediaKeyError* error)
@@ -272,6 +277,7 @@ void MediaKeySession::stop()
void MediaKeySession::trace(Visitor* visitor)
{
+ visitor->trace(m_asyncEventQueue);
visitor->trace(m_keys);
EventTargetWithInlineData::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698