Re: [heycam/webidl] Proposal: DOMException.ignoreAborts(promise) (#933)

> From a point of view of Blink-V8 bindings, IIUC, you're going to implement a new (static?) IDL operation (which takes a promise and returns a promise) and no new mechanism seems necessary.

Yep! I just wanted to check, since you all are really the best "owners" for `DOMException`.

> I'm sorry that I'm not familiar with this sort of code and honestly I don't understand its usefulness. Probably it's very common, I guess? Only my question is that AbortError is so special

Yeah, `"AbortError"` is quite special, because it's a type of error that's often expected by web developers who have aborted something, and they want to ignore it. (Things they could abort would be, e.g., a fetch, or a stream pipe.)

Some of the original designs for promise cancelation (what is now `AbortSignal`) actually used a new type of completion value, not an exception and not a return value, to represent cancelations. Instead we ended up reusing the exception channel, but this leads to awkward code like the above where you want to treat most exceptions as exceptions, but ignore `"AbortError"`s since they represent a cancelation.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/933#issuecomment-718925850

Received on Thursday, 29 October 2020 18:02:58 UTC