mirror of https://github.com/lukechilds/node.git
Browse Source
Convert the Buffer to an ArrayBuffer. The typed_array.buffer property should be an ArrayBuffer to avoid confusion: a Buffer doesn't have a byteLength property and more importantly, its slice() method works subtly different. That means that before this commit: var buf = new Buffer(1); var arr = new Int8Array(buf); assert.equal(arr.buffer, buf); assert(arr.buffer instanceof Buffer); And now: var buf = new Buffer(1); var arr = new Int8Array(buf); assert.notEqual(arr.buffer, buf); assert(arr.buffer instanceof ArrayBuffer);v0.9.10-release
Ben Noordhuis
12 years ago
2 changed files with 30 additions and 34 deletions
Loading…
Reference in new issue