W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

Re: [Futures] accept/resolve/reject on a resolver don't have clearly defined behavior if no value is passed

From: Anne van Kesteren <annevk@annevk.nl>
Date: Thu, 6 Jun 2013 12:12:49 +0100
Message-ID: <CADnb78j9GZG1OJ1JejB5L5hFygLp27L5nW5wD4ytCtmequst7g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>, Cameron McCormack <cam@mcc.id.au>
Cc: DOM mailing list <www-dom@w3.org>
On Fri, May 31, 2013 at 4:43 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> The spec has:
>
>   void accept(optional any value);
>
> and the prose says:
>
>   The accept(value) method must run context object's accept with value.
>
> But "value" is optional, so it can be not passed.  And the accept algorithm
> assumes there is a value.  Maybe.  It certainly passes the value to
> callbacks, but those callbacks have an _optional_ argument.  So maybe the
> intent is that if accept() is not passed a value the callbacks will also not
> be passed a value?
>
> This needs to be clarified.

The behavior we want is equivalent to:

function accept(value) { ... }
accept()

Which will result in value being undefined. I'd argue this is an IDL
bug, but I could make an intermediate fix to the specification if that
helps.


--
http://annevankesteren.nl/
Received on Thursday, 6 June 2013 11:13:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:21 UTC