[whatwg] Race condition in media load algorithm

  There's a race condition in the media load algorithm. When the 
resource selection algorithm begins, it sets a task to complete the rest 
of the resource selection algorithm asynchronously. In the asynchronous 
task, we set the delaying-the-load-event flag to true at step 4. But 
between the resource selection algorithm setting the task to 
asynchronously continue the algorithm, and the task actually running, 
the load event could fire, before we have a chance to set the 
delaying-the-load-event flag to true. I suggest we set the 
delaying-the-load-event flag to true before we set the task to continue 
the rest of the resource selection algorithm asynchronously.

Chris Pearce.

Received on Sunday, 1 August 2010 18:50:20 UTC