Re: WebIDL generated TypeErrors and promises

On 6/28/13 11:01 AM, Marcos Caceres wrote:
> Ok, but this potentially breaks WebIDL… maybe kinda… I think most specs assume that WebIDL does its thing, then algorithmic prose runs.

That's how it works, yes.

> This would mean that specs that use promises need to be written as:
>
> [[
> When the foo(V) method is invoked:

Won't work, because that prose is not entered until after WebIDL does 
its thing.  In particular, WebIDL is what defines the [[Call]] of the JS 
function.

If we want a different behavior here, it needs to be specified in WebIDL.

> 1. do type conversion on V as per WebIDL, and let error be any exception thrown. If an exception is thrown, run the promise's

Which promise's?  The exception is getting thrown before a promise ever 
gets created in this case.

-Boris

Received on Friday, 28 June 2013 15:07:58 UTC