I'm using Webworker to process array of pixels from Canvas and after returning it back - assign to ImageData array. Firefox works great, but Chromium puts an empty pixel array to the Canvas. Investigation showed that array copying isnt working, resulting array has nulled elements. Array slicing didnt help either, only going through each element with for in helped, but I wonder what is the problem here?
imgd = ctx.createImageData(w,h);
worker.onmessage = function (e) {
imgd.data = e.data;
console.log(imgd.data === e.data); // true in FF, false in Chromium
img.data = e.data.slice(0);
console.log(imgd.data); // correct in FF, empty array in Chromium
};