-
Notifications
You must be signed in to change notification settings - Fork 51
Replaced deprecated InvalidAccessError with NotAllowedError
#278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced deprecated InvalidAccessError with NotAllowedError
#278
Conversation
|
For the case when
|
svgeesus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
mjwilson-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think you are right and NotAllowedError is the best fit for both of these. Thank you.
|
Chromium change here: https://crrev.com/c/7242095 |
The change in spec: WebAudio/web-midi-api@3795f22 According PR: WebAudio/web-midi-api#278
See WebAudio/web-midi-api#278 The exception type when sysex access is denied has been changed in the spec to NotAllowedError instead of the deprecated InvalidAccessError. The exception type was also changed when opening a MIDIPort, but it looks like Chromium doesn't currently throw an exception in this case so no update is necessary right now. Change-Id: Ic80cb39064c8240c6bc00d5f0a7f36e6c7bdd09b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7242095 Reviewed-by: Takashi Toyoshima <[email protected]> Commit-Queue: Michael Wilson <[email protected]> Cr-Commit-Position: refs/heads/main@{#1556825}
…42334) MIDI APIs now use NotAllowedError instead of InvalidAccessError The change in spec: WebAudio/web-midi-api@3795f22 According PR: WebAudio/web-midi-api#278
…d `SecurityError` and `InvalidAccessError` in favor of `NotAllowedError` r?gsvelto,bholley = `InvalidAccessError` replaced by `NotAllowedError`: The change in spec: [WebAudio/web-midi-api@3795f22](WebAudio/web-midi-api@3795f22) According PR: [WebAudio/web-midi-api#278](WebAudio/web-midi-api#278) MDN update PR: [mdn/content#42334](mdn/content#42334) == Affected APIs 1. `.send` method of output MIDI ports 2. `.open` method of MIDI ports = `SecurityError` replaced by `NotAllowedError`: The change in spec: [WebAudio/web-midi-api@b7806b8](WebAudio/web-midi-api@b7806b8) According PR: [WebAudio/web-midi-api#267](WebAudio/web-midi-api#267) MDN update PR: [mdn/content#41956](mdn/content#41956) == Affected APIs 1. `navigator.requestMIDIAccess` method
|
Firefox change: https://bugzilla.mozilla.org/show_bug.cgi?id=2007071 |
According to Web IDL spec on
InvalidAccessError:Previously, while trying to open
MIDIPort,"InvalidAccessError" DOMExceptionwas thrown when...In this case, I believe
NotAllowedErrorfits well, according to its Web IDL spec description:Security and permissions reasons are only a subset of the appropriate causes, according to this definition. An attempt to
openthe port can fail. Somebody's exclusive lock on the port, or the port being disconnected, is the current context driving the platform's decision not to allow the operation.And in the context of forbidden
.sendcalls:NotAllowedErrorfits even better, because it fits an explicitly defined subset of permission errors.