Chromium Code Reviews| 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 |