W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Race condition in media load algorithm

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 03 Aug 2010 11:40:33 -0400
Message-ID: <4C583871.4020004@mit.edu>
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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:59 UTC