Skip to content

[Gecko Bug 2068066] Return null from *List.item() in Web Speech when the index is out of range. - #62566

Merged
moz-wptsync-bot merged 1 commit into
masterfrom
gecko/2068066
Sep 10, 2026
Merged

moz-wptsync-bot merged 1 commit into
masterfrom
gecko/2068066

Conversation

@moz-wptsync-bot

Copy link
Copy Markdown
Collaborator

item() indexed straight into the array, so an out-of-range index crashed.
Blink's item() returns nullptr there and its bindings hand that to JS as
null, so make the WebIDL return type nullable and do the same.

WebAudio/web-speech-api#212 aligns the spec.

Differential Revision: https://phabricator.services.mozilla.com/D324284

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2068066
gecko-commit: 7345f092b989ee703ac09898eb0ae04ee434a111
gecko-commit-git: 15e65f9002f4193a1eff321726ff8983d413f829
gecko-reviewers: media-playback-reviewers, webidl, smaug, alwu

…range.

item() indexed straight into the array, so an out-of-range index crashed.
Blink's item() returns nullptr there and its bindings hand that to JS as
null, so make the WebIDL return type nullable and do the same.

WebAudio/web-speech-api#212 aligns the spec.

Differential Revision: https://phabricator.services.mozilla.com/D324284

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2068066
gecko-commit: 7345f092b989ee703ac09898eb0ae04ee434a111
gecko-commit-git: 15e65f9002f4193a1eff321726ff8983d413f829
gecko-reviewers: media-playback-reviewers, webidl, smaug, alwu

@wpt-pr-bot wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

@moz-wptsync-bot
moz-wptsync-bot merged commit 6c9d5a7 into master Sep 10, 2026
26 checks passed
@moz-wptsync-bot
moz-wptsync-bot deleted the gecko/2068066 branch September 10, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants