#55155: fix: extension code drift
Merged
Created: Oct 20, 2026, 8:31:15 PM
Merged: Oct 23, 2026, 12:41:54 PM
5 comments
Target: main
Description of Change
Over the years, Electron's extension code has slowly drifted from changes happening upstream. Most recently, Igalia has been moving more APIs from //chrome into //extensions (thank you!).
To modernize our codebase with these changes, I've had Claude take a pass at fixing this drift. The work is split up by commit which is the best way to review this PR. If folks would rather these be individual PRs, let me know!
I tried to keep these changes free of introducing any APIs for customizing extension behavior. I'd like to defer those to follow up PRs.
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - tests are changed or added
- relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, past tense, and no longer than 80 characters.
Release Notes
Notes:
- Fixed extension
chrome.webRequestevents reporting atabIdof-1andchrome.declarativeNetRequestrules restricted to tabs never matching. - Fixed
session.clearStorageData()unregistering the service workers of loaded extensions. - Fixed a crash when an extension called
chrome.cookies.getAllCookieStores(). - Fixed
chrome.managementmethods and events being unavailable to extensions with themanagementpermission. - Fixed
__MSG_*__placeholders not being localized in extension stylesheets. - Fixed extension service workers being stopped after 30 seconds while a WebSocket was active.
- Fixed sandboxed extension pages being hosted in a process with extension API privileges.
- Fixed
navigator.clipboardbeing unavailable in extension service workers. - Fixed extension service workers running an outdated script after an app restart when the extension's files changed without a version change.
- Fixed
chrome.alarmsand content scripts registered withpersistAcrossSessionsnot persisting across app restarts.
Backports
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