FileReader: Make a copy of the ArrayBuffer when returning partial results

Desktop / Chromium - Marijn Kruisselbrink [chromium.org] - 28 February 2019 01:44 EST

This is to avoid accidentally ending up with multiple references to the same underlying ArrayBuffer. The extra performance overhead of this is minimal as usage of partial results is very rare anyway (as can be seen on https://www.chromestatus.com/metrics/feature/timeline/popularity/2158).

Bug: 936448 Change-Id: Icd1081adc1c889829fe7fa4af9cf4440097e8854 Reviewed-on: https://chromium-review.googlesource.com/c/1492873 Commit-Queue: Marijn Kruisselbrink

ba9748e78ec7 FileReader: Make a copy of the ArrayBuffer when returning partial results.
.../blink/renderer/core/fileapi/file_reader_loader.cc | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

Upstream: git.chromium.org


  • Share