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

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

Issue 363953002: Oilpan: have the media element safely close its MediaSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tidy clearing of m_attachedElement 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 | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.h
diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h
index b797b4c26fbef2ac93ea248ba2f361756884ab8f..4527a8b181f658beb00217856d6b8fedbb771be1 100644
--- a/Source/core/html/HTMLMediaElement.h
+++ b/Source/core/html/HTMLMediaElement.h
@@ -292,6 +292,15 @@ public:
#if ENABLE(OILPAN)
bool isFinalizing() const { return m_isFinalizing; }
+
+ // Oilpan: finalization of the media element is observable from its
+ // attached MediaSource; it entering a closed state.
+ //
+ // Express that by having the MediaSource keep a weak reference
+ // to the media element and signal that it wants to be notified
+ // of destruction if it survives a GC, but the media element
+ // doesn't.
+ void setCloseMediaSourceWhenFinalizing();
#endif
protected:
@@ -524,7 +533,7 @@ private:
DisplayMode m_displayMode;
- RefPtr<HTMLMediaSource> m_mediaSource;
+ RefPtrWillBeMember<HTMLMediaSource> m_mediaSource;
mutable double m_cachedTime;
mutable double m_cachedTimeWallClockUpdateTime;
@@ -566,6 +575,7 @@ private:
bool m_processingPreferenceChange : 1;
#if ENABLE(OILPAN)
bool m_isFinalizing : 1;
+ bool m_closeMediaSourceWhenFinalizing : 1;
#endif
double m_lastTextTrackUpdateTime;
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698