summaryrefslogtreecommitdiff
path: root/src/js/post.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-28 15:14:13 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-28 15:14:13 -0800
commitf30c01daf0375dee57d0d88896cad1c3dbd59db8 (patch)
tree6889856dae59221a12a3616a331491ff5346421f /src/js/post.js
parentbbefe366f4d585ae1103c59b3c20a3f1dfc9f225 (diff)
downloadbinaryen-f30c01daf0375dee57d0d88896cad1c3dbd59db8.tar.gz
binaryen-f30c01daf0375dee57d0d88896cad1c3dbd59db8.tar.bz2
binaryen-f30c01daf0375dee57d0d88896cad1c3dbd59db8.zip
use new on ArrayBuffer
Diffstat (limited to 'src/js/post.js')
-rw-r--r--src/js/post.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/post.js b/src/js/post.js
index c4df41865..4377ed797 100644
--- a/src/js/post.js
+++ b/src/js/post.js
@@ -91,7 +91,7 @@ function integrateWasmJS(Module) {
// TODO: avoid this copy, by avoiding such static init writes
// TODO: in shorter term, just copy up to the last static init write
var oldBuffer = Module['buffer'];
- var newBuffer = ArrayBuffer(oldBuffer.byteLength);
+ var newBuffer = new ArrayBuffer(oldBuffer.byteLength);
(new Int8Array(newBuffer)).set(new Int8Array(oldBuffer));
updateGlobalBuffer(newBuffer);
updateGlobalBufferViews();