am 086bd7fe: Merge change 6846 into donut

Merge commit '086bd7fed122f636e210b03eb114051a489f347b'

* commit '086bd7fed122f636e210b03eb114051a489f347b':
  Avoid memcpy's by using GetPrimitiveArrayCritical.