[whatwg] Race condition in media load algorithm

Boris Zbarsky bzbarsky at MIT.EDU
Tue Aug 3 08:40:33 PDT 2010

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.


More information about the whatwg mailing list