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

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

Issue 552303006: Prevent more script-observable cases of HTMLMediaElement GC (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « LayoutTests/media/track/track-remove-track.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 297200ac63334d0e5ee4d36028048b6a16e59a94..306777c76b6a4e33b9d88e664fa7acfec7fa47f7 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3468,7 +3468,22 @@ void HTMLMediaElement::stop()
bool HTMLMediaElement::hasPendingActivity() const
{
- return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents();
+ if (m_shouldDelayLoadEvent)
+ return true;
+
+ if (m_networkState == NETWORK_LOADING)
+ return true;
+
+ if (potentiallyPlaying())
Ken Russell (switch to Gerrit) 2014/09/11 18:20:56 Consider the case where a video is set to loop and
acolwell GONE FROM CHROMIUM 2014/09/11 19:02:24 I believe it we add an m_readyStateMaximum = HAVE_
philipj_slow 2014/09/12 14:05:20 I'll add "if (!document().isActive()) return false
+ return true;
+
+ if (m_seeking)
+ return true;
+
+ if (m_asyncEventQueue->hasPendingEvents())
+ return true;
+
+ return false;
}
void HTMLMediaElement::contextDestroyed()
« no previous file with comments | « LayoutTests/media/track/track-remove-track.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698