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

[whatwg] Race condition in media load algorithm

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 04 Aug 2010 13:19:35 -0400
Message-ID: <4C59A127.1020705@mit.edu>
On 8/4/10 6:56 AM, Philip J?genstedt wrote:
> On Wed, 04 Aug 2010 11:32:51 +0200, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> On 8/4/10 4:29 AM, Philip J?genstedt wrote:
>>> That could be, but is this behavior actually useful for anything? It's
>>> certainly simpler to implement and more predictable for authors to
>>> always wait until the current script has finished executing.
>> 1) That requires defining "current script".
> OK, but that's just a spec problem. It's trivial in implementation
> because when the resource selection algorithm was is triggered by a
> script, you can just pass along a reference to that very script.

It's not, in fact, trivial in implementation.  You're making assumptions 
about how implementations work that don't seem warranted (e.g. the 
concept of "reference to that very script" is not well-defined in some 
implementations).  In particular, what you're proposing is not at all 
trivial in Gecko.

>> 2) Who said it will ever finish executing?
> If it doesn't, just don't ever continue with the synchronous section.

I don't think that's reasonable.

> Is there any valid case for a script never finishing?

Yes, it could showModalDialog and the user could spend several hours 
interacting with it.

> It would block all event handlers from running too

I believe this is false in the case of showModalDialog.

Received on Wednesday, 4 August 2010 10:19:35 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:25 UTC