Passing a canvas to a NaCl module is done in the earth example to load a texture from a jpeg (see examples/demo/earth in the SDK).
Here is a snippet from that example:
var imageData = context.getImageData(0, 0, img.width, img.height);
// Send NaCl module the raw image data obtained from canvas.
common.naclModule.postMessage({'message' : 'texture',
'name' : name,
'width' : img.width,
'height' : img.height,
'data' : imageData.data.buffer});
So it looks like you just need to change your code to this:
NaClModule.postMessage(imageData.data.buffer);
And it should work.