codebytere

#48843: refactor: remove spellcheck::kWinDelaySpellcheckServiceInit patch

Merged
Created: Nov 7, 2025, 9:48:39 AM
Merged: Nov 8, 2025, 10:26:06 AM
3 comments
Target: main

Description of Change

Closes #48635

Fixes a crash that occurred after https://chromium-review.googlesource.com/c/chromium/src/+/7012087 removed spellcheck::kWinDelaySpellcheckServiceInit - this crash was specific to Windows, and occurred here:

if (spellcheck::UseBrowserSpellChecker()) {
spellcheck_platform::RemoveWord(service->platform_spell_checker(),
base::UTF8ToUTF16(word));
}
if ses.removeWordFromSpellCheckerDictionary(word) was called before dictionary initialization finished. This happened because InitializeDictionaries, which stopped being called on startup after the above feature was introduced, was responsible for initializing the platform spellchecker on windows. This lead to a nullptr crash. Fix this by calling service->InitializeDictionaries(base::DoNothing()); via session ctor.

Checklist

Release Notes

Notes: none

Backports

39-x-y
Merged
PR Number
#48857
Merged At
Nov 10, 2025, 10:54:01 AM
Released In
v39.1.2
Release Date
Nov 10, 2025, 2:06:59 PM
40-x-y
Merged
PR Number
#48856
Merged At
Nov 10, 2025, 2:51:18 AM
Released In
v40.0.0-alpha.5
Release Date
Nov 14, 2025, 2:22:11 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