Closed Bug 1550975 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 16695 - Check for detached ArrayBuffers in WebUSB transfer functions

Categories

(Core :: DOM: Device Interfaces, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 16695 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/16695
Details from upstream follow.

Reilly Grant <reillyg@chromium.org> wrote:

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/+/1598048
Reviewed-by: Jeremy Roman \<jbroman@chromium.org>
Commit-Queue: Reilly Grant \<reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657350}

Component: web-platform-tests → DOM: Device Interfaces
Product: Testing → Core
Failed to get results from try push
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/34d3015c4c23
[wpt PR 16695] - Check for detached ArrayBuffers in WebUSB transfer functions, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.