MarshallOfSound

#53305: fix: main process crashes from WebUI host matching, worker AI bindings, extension background page media and serial port revocation

Merged
Created: Aug 29, 2026, 1:03:19 AM
Merged: Aug 31, 2026, 10:30:41 AM
6 comments
Target: main

Description of Change

Four small main-process crash fixes, each with a crash-case fixture (except the serial one, which needs hardware to exercise):

  • ElectronWebUIControllerFactory matched WebUI pages by host only, so navigating a window to e.g. http://accessibility/ was treated as a WebUI navigation and hit NOTREACHED in RenderFrameHostImpl::AllowBindings. It now also requires chrome:// (or devtools:// for the DevTools host).
  • With session.registerLocalAIHandler() set, a LanguageModel call from a Worker reached ProxyingAIManager with no RenderFrameHost and dereferenced it. Such requests are now reported as unavailable.
  • Extension background pages get api::WebContents as their delegate but never had a WebContentsPermissionHelper, so navigator.mediaDevices.* (and pointer/keyboard lock) from a background page dereferenced null. The helper is now created for every WebContents that api::WebContents adopts.
  • SerialChooserContext::RevokePortPermissionWebInitiated dereferenced port_info_.end() when SerialPort.forget() was called for a port the context no longer knew about (e.g. after the device was unplugged).

Checklist

Release Notes

Notes: Fixed main process crashes when navigating to http://accessibility/ or http://devtools/, when using the LanguageModel API from a Worker with a local AI handler registered, when an extension background page used navigator.mediaDevices, and when calling SerialPort.forget() for a disconnected device.

Backports

43-x-y
Merged
PR Number
#53332
Merged At
Aug 31, 2026, 12:49:23 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#53333
Merged At
Aug 31, 2026, 12:49:52 PM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#53325
Merged At
Aug 31, 2026, 12:07:46 PM
Released In
v45.0.0-alpha.3
Release Date
Aug 31, 2026, 3:00:16 PM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

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