Skip to content

fix: always emit executableWillLaunchAtLogin from getLoginItemSettings#51416

Merged
jkleinsc merged 2 commits into
mainfrom
sattard/fix-executable-will-launch-at-login
May 5, 2026
Merged

fix: always emit executableWillLaunchAtLogin from getLoginItemSettings#51416
jkleinsc merged 2 commits into
mainfrom
sattard/fix-executable-will-launch-at-login

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member

Description

Converter<LoginItemSettings>::ToV8 in shell/common/gin_converters/login_item_settings_converter.cc only set executableWillLaunchAtLogin inside the #if BUILDFLAG(IS_WIN) branch. As a result, app.getLoginItemSettings() on macOS returned an object where executableWillLaunchAtLogin was undefined rather than the boolean its documented type implies.

Fix

  • Move the executable_will_launch_at_login field out of the Windows-only section of LoginItemSettings in shell/browser/browser.h so it is defined (default false) on every platform.
  • Unconditionally emit executableWillLaunchAtLogin in the V8 converter.

The value is still only meaningful on Windows (computed by Browser::GetLoginItemSettings in browser_win.cc); on other platforms it now reliably reads as false instead of undefined.

Checklist

  • PR description describes what the change does (no need to specify why)
  • PR title follows semantic commit messages
  • No semver/major change

Notes: Fixed app.getLoginItemSettings() returning undefined for executableWillLaunchAtLogin on macOS; the property is now always a boolean.

`Converter<LoginItemSettings>::ToV8` only set `executableWillLaunchAtLogin`
inside the Windows build block, so calling `app.getLoginItemSettings()` on
macOS returned an object where the property was `undefined` rather than
the boolean its type implies.

Move the `executable_will_launch_at_login` field out of the Windows-only
section of `LoginItemSettings` (it keeps its `false` default everywhere)
and unconditionally emit the property in the V8 converter. The value is
still only meaningful on Windows; on other platforms it is always
`false`.
@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 30, 2026
@electron-cation electron-cation Bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Apr 30, 2026
@jkleinsc jkleinsc merged commit 434ef40 into main May 5, 2026
71 checks passed
@jkleinsc jkleinsc deleted the sattard/fix-executable-will-launch-at-login branch May 5, 2026 20:47
@release-clerk

release-clerk Bot commented May 5, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed app.getLoginItemSettings() returning undefined for executableWillLaunchAtLogin on macOS; the property is now always a boolean.

@trop

trop Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "42-x-y", please check out #51507

@trop trop Bot added in-flight/42-x-y and removed target/42-x-y PR should also be added to the "42-x-y" branch. labels May 5, 2026
@trop

trop Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "41-x-y", please check out #51508

@trop

trop Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "40-x-y", please check out #51509

@trop trop Bot added in-flight/41-x-y in-flight/40-x-y merged/42-x-y PR was merged to the "42-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. and removed target/41-x-y PR should also be added to the "41-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. in-flight/42-x-y in-flight/41-x-y in-flight/40-x-y labels May 5, 2026
@trop trop Bot added the merged/40-x-y PR was merged to the "40-x-y" branch. label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/40-x-y PR was merged to the "40-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants