Check for detached ArrayBuffers in Web Bluetooth writeValue functions
This change adds checks to verify that the ArrayBuffers passed to Web Bluetooth's characteristic and descriptor writeValue() functions have not been detached. If so then an InvalidStateError is thrown. While the previous behavior was safe from use-after-frees it silently set the characteristic or descriptor to an empty value which would be difficult to debug. Change-Id: Iee3d6b9f80d63961199b16a5de90bdd141ed152b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1604307Reviewed-by:Jeremy Roman <jbroman@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#658415}
Showing
Please register or sign in to comment