Merge change 22771 into eclair

* changes:
  Don't mutate input in OSMemory.setIntArray/setShortArray.