W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

[Bug 23369] Provide hooks for Typed Arrays (ArrayBuffer and friends)

From: <bugzilla@jessica.w3.org>
Date: Wed, 18 Jun 2014 02:20:12 +0000
To: public-script-coord@w3.org
Message-ID: <bug-23369-3890-Luyk7BYDM7@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23369

--- Comment #26 from Domenic Denicola <domenic@domenicdenicola.com> ---
The question is, could interop survive with the undefined behavior Allen
suggests? I am not so sure.

For example, let's say that in browser A the code given always produces
ciphertext for [0, 1, 2, 3], whereas browser B has implemented an optimization
that ~10% of the time produces ciphertext for [4, 1, 2, 3]. Users will find
sites that break 10% of the time in browser B, and then browser game theory
comes into play, causing browser B to drop their optimization. At that point we
may as well have specced to always produce ciphertext for [0, 1, 2, 3]; the
undefined behavior has acquired a de-facto required definition.

I am wary of the performance perils of excessive copying as well, but I don't
think undefined behavior can survive long on the web.

Furthermore, it's worth pointing out that if browsers would get around to
implementing copy-on-write for array buffers, then the copying behavior would
be free in the usual case (where the JS programmer does not mutate the array
buffer after giving it to web crypto). I have heard implementers say COW is
hard and not likely to get done any time soon, but I haven't heard them say
that it's impossible or incompatible with the design of typed arrays.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 18 June 2014 02:20:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC