#52955: fix: bind a stub for media.mojom.OnDeviceSpeechRecognition
Description of Change
Blink requests media.mojom.OnDeviceSpeechRecognition from the frame's BrowserInterfaceBroker whenever a page calls SpeechRecognition.available() or SpeechRecognition.install() with processLocally, or starts a recognition with processLocally set. Only //chrome registers a binder for it, so in Electron the broker reported "No binder found for interface" as a bad message and the browser killed the renderer with RPH_MOJO_PROCESS_ERROR.
This registers a stub in RegisterBrowserInterfaceBindersForFrame that answers Available() with kUnavailable and Install() with false, so the promises settle and the renderer survives. Any page using the new on-device speech API triggers this, so it lands on whichever renderer loads one.
Checklist
- PR description included and stakeholders cc'd
-
npm testpasses - tests are changed or added
- PR title follows semantic commit guidelines
Release Notes
Notes: Fixed a renderer crash when a page calls SpeechRecognition.available() or SpeechRecognition.install() with processLocally.
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron