[Bug 25048] consider whether an IDL attribute of type Promise<T> should catch exceptions and wrap them up as a rejected Promise like they are for operations

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25048

--- Comment #8 from Domenic Denicola <d@domenic.me> ---
(In reply to Boris Zbarsky from comment #7)
> OK, I guess if you only have one promise representing your state then it
> makes sense to make it an attribute. But then I'm not sure it makes sense to
> have that attribute create-and-return promises when called with the wrong
> this object.
> 
> Put another way, I strongly feel like for attribute getters we should
> preserve the invariant that getter.call(obj) == getter.call(obj) tests true.

I disagree that this invariant applies here. Its synchronous analogue is saying
that getter.call(obj), when it fails, should always throw the same error. It's
OK to return a different promise in the failure cases.

> As far as setters, if we have no use cases, let's not add complexity and
> just disallow them.  WebIDL already has too many unused (and never will be
> used!) things that just make it more complex than it should be.

Sounds good to me to disallow promise types with setters.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Thursday, 13 October 2016 13:37:27 UTC