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

Unified Diff: Source/core/html/track/CueTimeline.cpp

Issue 1282903003: Don't update the active cue set in detached Documents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Limit to non-oilpan; generalize. Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/CueTimeline.cpp
diff --git a/Source/core/html/track/CueTimeline.cpp b/Source/core/html/track/CueTimeline.cpp
index 51cb6ae6062d59a6d43fa2e87a30e598b6c91038..bab2ebbecc25038b92349b416c741250b5d9aff7 100644
--- a/Source/core/html/track/CueTimeline.cpp
+++ b/Source/core/html/track/CueTimeline.cpp
@@ -132,6 +132,14 @@ void CueTimeline::updateActiveCues(double movieTime)
HTMLMediaElement& mediaElement = this->mediaElement();
+#if !ENABLE(OILPAN)
+ // Don't run the "time marches on" algorithm if the document has been
+ // detached. This primarily guards against dispatch of events w/
+ // HTMLTrackElement targets.
+ if (mediaElement.document().isDetached())
+ return;
+#endif
+
// https://html.spec.whatwg.org/#time-marches-on
// 1 - Let current cues be a list of cues, initialized to contain all the
@@ -348,7 +356,7 @@ void CueTimeline::endIgnoringUpdateRequests()
{
ASSERT(m_ignoreUpdate);
--m_ignoreUpdate;
- if (!m_ignoreUpdate && mediaElement().inActiveDocument())
+ if (!m_ignoreUpdate)
updateActiveCues(mediaElement().currentTime());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698