- From: Mattias Buelens <notifications@github.com>
- Date: Mon, 17 May 2021 15:11:23 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 17 May 2021 22:11:45 UTC
> I'm wondering if we should restructure things to naturally let TransferArrayBuffer throw (and perhaps that thrown exception would get turned into a promise rejection in some cases). This only works if we can transfer after all precondition checks, but before any other state mutations. But at a glance that appears to be how you've factored things? I think I started with that once, but then ran into some roadblock which required me to check transferability in advance. But that's a long time ago, perhaps the more recent changes made it possible. I'll have another try. 🙂 > I guess that's kind of a subtle hidden requirement on us as spec maintainers though, which is not great... Indeed, we must be careful to use `?` instead of `!` in places where we *might* be trying to transfer a user-provided (and thus potentially WebAssembly-backed) `ArrayBuffer`. Fortunately, I don't think there are *that* many places where this can happen, most of our `TransferArrayBuffer` calls happen internally on an already-transferred (and thus definitely transferable) `ArrayBuffer`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/1123#issuecomment-842675496
Received on Monday, 17 May 2021 22:11:45 UTC