#53903: refactor: replace four small browser-side Chromium patches with existing API
Description of Change
Four Chromium patches that only give Electron's browser code a hook can be replaced with API that already exists. One commit per patch so each can be reviewed or reverted on its own; each commit message says what the patch did and what replaces it.
| Patch removed | Electron-side replacement |
|---|---|
allow_setting_secondary_label_via_simplemenumodel.patch |
Nothing left to replace: since #53878 ElectronMenuModel is a plain ui::MenuModel whose items answer GetSecondaryLabel() themselves, and no remaining ui::SimpleMenuModel::Delegate in Electron overrides the patched-in GetSecondaryLabelForCommandId(), so the patch is deleted as dead. |
upload_list_add_loadsync_method.patch |
The synchronous crashReporter.getUploadedReports() reads the list through a small subclass in the crash reporter that exposes the protected UploadList::LoadUploadList(); CrashUploadListCrashpad and CombiningUploadList are not final. |
fix_allow_reentrancy_on_downloadmanagerimpl_observer_list.patch |
session.createInterruptedDownload() and webContents.savePage() create their download item from a posted task, so calling them from a will-download handler (or a promise continuation of one) no longer re-enters DownloadManagerImpl's observer list. will-download for an interrupted download now fires on the next task instead of before createInterruptedDownload() returns. |
revert_remove_the_feature_flag_kdropinputeventswhilepaintholding.patch |
webContents.sendInputEvent() activates the widget's InputRouter before dispatching, so explicitly sent events are not dropped while the browser holds the previous page's paint after a navigation. Real user input during that window now behaves as it does in Chromium, and the feature_list.cc entry goes away with the patch. |
Verified on Linux over a testing build: the crashReporter, Menu/MenuItem, session (will-download, DownloadItem, createInterruptedDownload), webContents (including sendInputEvent), BrowserWindow.savePage, autofill, spellchecker, webFrame, guest-window-manager specs and the <webview> sendInputEvent and chromium focus-handling cases pass, and calling createInterruptedDownload() and savePage() from inside a will-download handler completes without the observer-list re-entrancy CHECK.
Checklist
- PR description included and stakeholders cc'd
-
npm testpasses - I have reviewed and verified the changes
Release Notes
Notes: none
Backports
No Backports Requested
This pull request doesn't have any backports requested or created for older release branches.
What are backports?
Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.
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