gamepad: Use FrozenArrays for Gamepad#axes and Gamepad#buttons.
Sync our IDL file with https://github.com/w3c/gamepad/pull/62 ("Switch from WebIDL arrays to FrozenArray<>s in the IDLs"). WebIDL has not had array types since 2015, so finally make our IDL files compliant with modern WebIDL following the spec fix. It is important to note that this change modifies the existing behavior slightly. - |axes| and |buttons| are now frozen objects with all the related consequences for its properties and prototype. - Those two attributes now return the same _object_ until their values change instead of always returning a new object on access. Doing so aligns our code with both the spec as well as Gecko, which has done the above ever since it implemented the Gamepad spec. Bug: 740875 Change-Id: Ifb618c9d4f8860eb55efc882e701dae7390808a5 Reviewed-on: https://chromium-review.googlesource.com/595979Reviewed-by:Matt Reynolds <mattreynolds@chromium.org> Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#491440}
Showing
Please register or sign in to comment