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

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: 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..bbfdc95164a7afa4e682a3142a3ed3606223efa0 100644
--- a/Source/core/html/track/CueTimeline.cpp
+++ b/Source/core/html/track/CueTimeline.cpp
@@ -132,6 +132,12 @@ void CueTimeline::updateActiveCues(double movieTime)
HTMLMediaElement& mediaElement = this->mediaElement();
+ // 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())
philipj_slow 2015/08/12 07:39:33 Do you think we should make if conditional on !OIL
fs 2015/08/12 07:55:45 I've been pondering whether the (somewhat similar)
+ return;
+
// https://html.spec.whatwg.org/#time-marches-on
// 1 - Let current cues be a list of cues, initialized to contain all the
« 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