Replaced deprecated InvalidAccessError with NotAllowedError#278
Merged
mjwilson-google merged 1 commit intoWebAudio:gh-pagesfrom Dec 9, 2025
Merged
Conversation
Contributor
Author
|
For the case when
|
mjwilson-google
approved these changes
Dec 9, 2025
Contributor
mjwilson-google
left a comment
There was a problem hiding this comment.
LGTM, I think you are right and NotAllowedError is the best fit for both of these. Thank you.
Contributor
|
Chromium change here: https://crrev.com/c/7242095 |
brave-builds
pushed a commit
to brave/chromium
that referenced
this pull request
Dec 10, 2025
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 <toyoshim@chromium.org> Commit-Queue: Michael Wilson <mjwilson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1556825}
wbamberg
pushed a commit
to mdn/content
that referenced
this pull request
Dec 19, 2025
…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
nikelborm
added a commit
to nikelborm/firefox
that referenced
this pull request
Dec 19, 2025
…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
Contributor
Author
nikelborm
added a commit
to nikelborm/firefox
that referenced
this pull request
Dec 25, 2025
…d `SecurityError` and `InvalidAccessError` in favor of `NotAllowedError` r?gsvelto = `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
nikelborm
added a commit
to nikelborm/firefox
that referenced
this pull request
Dec 25, 2025
…d `SecurityError` and `InvalidAccessError` in favor of `NotAllowedError` r?gsvelto = `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
nikelborm
added a commit
to nikelborm/firefox
that referenced
this pull request
Dec 25, 2025
…d `SecurityError` and `InvalidAccessError` in favor of `NotAllowedError` r=gsvelto = `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
nikelborm
added a commit
to nikelborm/firefox
that referenced
this pull request
Dec 25, 2025
…d `SecurityError` and `InvalidAccessError` in favor of `NotAllowedError` r=gsvelto = `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 Differential Revision: https://phabricator.services.mozilla.com/D277533
nikelborm
added a commit
to nikelborm/firefox
that referenced
this pull request
Dec 25, 2025
…d `SecurityError` and `InvalidAccessError` in favor of `NotAllowedError` r=gsvelto = `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 Differential Revision: https://phabricator.services.mozilla.com/D277533
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.