This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17157 - <track> Need to await a stable state before assigning /URL/ in the first run
Summary: <track> Need to await a stable state before assigning /URL/ in the first run
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
: 17156 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-23 12:20 UTC by contributor
Modified: 2012-09-07 21:51 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-05-23 12:20:15 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#sourcing-out-of-band-text-tracks
Complete: http://www.whatwg.org/c#sourcing-out-of-band-text-tracks

Comment:
<track> Need to await a stable state before assigning /URL/ in the first run

Posted from: 85.227.154.145 by simonp@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.64
Comment 1 Simon Pieters 2012-05-23 12:26:18 UTC
Consider

var track = document.createElement('track');
track.src = 'foo';

When the track is created, the loading algorithm starts, which immediately stores the track URL (which is the empty string) and runs the /download/ step async. That step says to fire an 'error' event if track URL is empty and then move on to the /monitoring/ step. Since it's async, it's racy as to whether the script will have set .src yet or not.

This is clearly bogus. We should await a stable state before storing /URL/ and starting the download.

Editorial comment: Since the same behavior should happen after the /monitoring/ step, these steps could be at the top of the /download/ so you don't need to have the exact same steps repeated in two places in the algorithm.
Comment 2 Simon Pieters 2012-05-23 17:38:48 UTC
(In reply to comment #1)
> Consider
> 
> var track = document.createElement('track');
> track.src = 'foo';

Make that:

var track = document.createElement('track');
track.mode = 'showing';
track.src = 'foo';
Comment 3 Simon Pieters 2012-06-04 05:21:34 UTC
*** Bug 17156 has been marked as a duplicate of this bug. ***
Comment 4 contributor 2012-07-18 17:42:03 UTC
This bug was cloned to create bug 18212 as part of operation convergence.