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

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

--- Comment #34 from Domenic Denicola <domenic@domenicdenicola.com> ---
I think you guys are talking past each other a bit. Allen is envisioning an API
that allows you to "mark as immutable" array buffers, and suggesting that these
methods should throw whenever given array buffers that aren't marked as such.
Whereas Ryan and Boris have taken him to mean that passing a (mutable) array
buffer to these methods would suddenly make them immutable.

So I believe Allen is suggesting something like

var ab = new ArrayBuffer(1024);
ArrayBuffer.makeImmutable(ab);
crypto.subtle.encrypt(ab); // works

var ab2 = new ArrayBuffer(1024);
crypto.subtle.encrypt(ab); // rejects with TypeError saying it needs to be
immutable.

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

Received on Wednesday, 18 June 2014 17:44:23 UTC