ArrayBuffer neutering

Anne van Kesteren annevk at annevk.nl
Tue May 20 07:37:36 PDT 2014


"ArrayBuffer instances whose [[ArrayBufferData]] is null are
considered to be neutered" However, most algorithms only check for it
being undefined (and sometimes missing).

In addition, the behavior defined seems incompatible with what is in browsers:

http://software.hixie.ch/utilities/js/live-dom-viewer/
<script>
 var a = new ArrayBuffer(12)
 onmessage = function(e) { w(e.data); w(e.data.byteLength); w(a);
w(a.byteLength) }
 postMessage(a, "http://software.hixie.ch", [a])
</script>

The above will log:

object "[object ArrayBuffer]" (0 props)
12
object "[object ArrayBuffer]" (0 props)
0

And not throw a TypeError as suggested.


-- 
http://annevankesteren.nl/


More information about the es-discuss mailing list