[Bug 28798] Indicate BufferSource algorithms can throw

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

--- Comment #8 from Domenic Denicola <d@domenic.me> ---
(In reply to Tab Atkins Jr. from comment #7)
> Similarly documenting: Font Loading's FontFace() constructor takes binary
> data, and would copy.
> 
> These examples, and my own intuition, suggest that most functions with
> binary data arguments are *consuming* those arguments, not sharing them, and
> so we should default to copying (which is the safer default anyway) and
> require an annotation to indicate that a reference is being held.

The way you phrase this is interesting. I'd think that if something is
*consuming* its argument, it should instead transfer it (thus detaching the
argument). Then, it has been consumed.

I guess that's probably not what you meant, but regardless it seems unfortunate
that there's no easy way for FontFace() users to avoid the copy, even if they
never intend to use that binary data again.

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

Received on Tuesday, 9 February 2016 22:50:26 UTC