[whatwg] Race condition in media load algorithm

On 8/3/10 4:27 AM, Philip J?genstedt wrote:
> For the record, here's how I interpreted "await a stable state":
>
> The only state that is not stable is a running script.

I don't think that's true; for example you could be in an unstable state 
if you're in the middle of the parser inserting some nodes into the DOM.

> Therefore, when reaching that step, if the
> resource selection algorithm was triggered by a script, wait until that
> script has finished and then continue.

Per spec as currently written, this will give the wrong behavior.  For 
example, if the script in question calls showModalDialog, this is 
supposed to interrupt the script task and spin the event loop, and so 
your synchronous section would need to run while the modal dialog is up. 
  It doesn't sound like your implementation does that.

-Boris

Received on Tuesday, 3 August 2010 08:40:33 UTC