#52712: fix: spellcheck failing to initialize on Linux
Description of Change
I traced the cause of Electron bug #50327 to Chromium bug https://issues.chromium.org/issues/543082396. I submitted a patch to Chromium to fix the bug https://chromium-review.googlesource.com/c/chromium/src/+/8206965 which was merged.
This PR backports that fix https://crrev.com/f7aaf9a09a06e77292ea077bcd1527034d02f449 to Electron.
The Electron patch is marked for removal once Chromium rolls past the upstream revision.
Fixes #50327
Testing
I'm interested in this primarily to fix element-hq/element-web#34139 but it should fix the same issue in other Electron apps too.
I verified by creating a small bug reduction Electron app that mirrors the Element Electron app's startup sequence, reading params.misspelledWord from context-menu. On each branch I built twice from the same tree, differing only in the one-line predicate:
| Branch | Chromium | with fix | predicate reverted |
|---|---|---|---|
| main | 153.0.7982.0 | PASS | FAIL |
| 44-x-y | 152.0.7977.30 | PASS | FAIL |
| 43-x-y | 150.0.7871.224 | PASS | FAIL |
spec/spellchecker-spec.ts passes on Linux (22/22, remainder skipped).
This is intended for backport to 44-x-y and 43-x-y (semver/patch). I verified the patch applies and the fix works on both, per the table above.
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 (no tests changed or added)
- relevant API documentation, tutorials, and examples are updated and follow the documentation style guide (no updates needed to this)
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed spellcheck not initializing on Linux when the dictionary was already cached from a previous run.
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