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

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

Issue 585903002: Fix the "inactive document" condition for 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/gc-pending-event-inactive-document.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 c84422593dd2d0288b17efe586c84891b6d990ee..d4bd662f8f5f7b714353371abde9d5a612a316dd 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3529,9 +3529,11 @@ void HTMLMediaElement::stop()
bool HTMLMediaElement::hasPendingActivity() const
{
- // After the document becomes inactive, no events can ever be fired.
- if (!document().isActive())
+ // After stop() the element is inactive and no events can ever be fired.
+ if (!m_active) {
fs 2014/09/19 12:40:50 Isn't the element also inactive after being remove
philipj_slow 2014/09/19 12:48:47 Yes, both the comment and the code (m_active) is t
philipj_slow 2014/09/19 12:56:33 Oh, you meant the bit in HTMLMediaElement::removed
+ ASSERT(!m_asyncEventQueue->hasPendingEvents());
return false;
+ }
// The delaying-the-load-event flag is set by resource selection algorithm when looking for a
// resource to load, before networkState has reached to NETWORK_LOADING.
« no previous file with comments | « LayoutTests/media/gc-pending-event-inactive-document.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698