andreasgal/j2me.js — pull request #37 by mykmelez (2014-08-05 22:09:03+00:00)
Title: use the 'new' operator on *Array constructor for Chrome compat

Using `Function.call` in `Classes.prototype.newArray` causes Chrome to throw `TypeError: Constructor Int8Array requires 'new'` here because the function in question is the Int8Array constructor. Presumably the other *Array constructors in arrays.js will have the same problem.

It isn't clear why `Function.call` is being used here, but it shouldn't be necessary, and this change makes the call work on both Firefox and Chrome. (Note that `Classes.prototype.newPrimitiveArray`, declared right above this function, uses `new`.)