Check for detached ArrayBuffers in WebUSB transfer functions
This change adds checks to verify that the ArrayBuffers passed to WebUSB functions controlTransferOut(), isochronousTransferOut(), and transferOut() have not been detached. If so then an InvalidStateError is thrown. While the previous behavior was safe from use-after-frees it silently sent the USB device an empty buffer which would be difficult to debug. Change-Id: I94249dd0097991b2b4933093ac85f50f0ccda7c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1598048Reviewed-by:Jeremy Roman <jbroman@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#657350}
Showing
Please register or sign in to comment