Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RaisesException to all methods in usb_device.idl
This change rewrites all the functions in the WebUSB API's USBDevice interface to use the ExceptionState class to generate exceptions that cause these methods to return a rejected Promise synchronously. Creating exceptions with the ExceptionState interface generates better diagnostic messages than constructing a DOMException manually. The logic has also been rewritten to use less nesting of conditionals for better readability. This is the second in a series of changes to use ExceptionState in this interface. The final change will update how Promises are rejected asynchronously. Change-Id: Id2a6a722c8fa20c23c43854ad30f707f1901c807 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3632666 Reviewed-by: Jack Hsieh <chengweih@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1001181}
- Loading branch information