- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 28 Oct 2013 19:46:41 -0400
- To: es-discuss@mozilla.org, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 10/28/13 7:43 PM, Boris Zbarsky wrote: > Our current implementation returns vanilla JS arrays, but returns a > new one every get, which is pretty suboptimal. So we were considering > changing them to some ArrayClass interface and thinking about what > issues that might cause for callers... To be clear, we _could_ just change this particular API (Gamepad) to returning a plain-vanilla JS array and the same one every time and allow the caller to write to it; it's not like the API implementation ever _reads_ this array, so there aren't even safety issues here. That still seems like it makes it really easy for a caller to accidentally modify the array and cause another caller to see incorrect data here, which smells quite fishy to me. -Boris
Received on Monday, 28 October 2013 23:47:09 UTC