-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bluetooth: Use [PassAsSpan] to handle BufferSource arguments
This change simplifies the implementation of Web Bluetooth methods which accept a BufferSource argument by using the [PassAsSpan] WebIDL attribute. Using this requires a behavior change: Passing a detached buffer is now no longer fatal (except when it causes other argument validation errors) because a detached buffer turns into an empty span. I think this is a safe change to make because it matches the WebIDL rules for handling detached buffers (throwing a specific error was unspecified behavior) and this case is developer error, so sites shouldn't be depending on it. Change-Id: I1e47d8e3a219f65bd69f78018a434ab6f8a3cd62 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952456 Auto-Submit: Reilly Grant <[email protected]> Commit-Queue: Reilly Grant <[email protected]> Reviewed-by: Matt Reynolds <[email protected]> Cr-Commit-Position: refs/heads/main@{#1372813}
- Loading branch information
1 parent
51d9d95
commit 94d1202
Showing
6 changed files
with
91 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters