ckerr

#48452: refactor: DRY in App::SetAppLogPath()

Merged
Created: Oct 3, 2025, 2:04:22 PM
Merged: Oct 5, 2025, 12:32:29 PM
1 comments
Target: main

Description of Change

This PR has two goals:

  1. Reduces duplicated code between the macOS and non-macOS implementations. App::SetAppLogPath() is now the same code on all platforms. The only platform-specific code is in a new static private helper function, App::GetDefaultAppLogPath().

  2. Indirectly helps the small series of PRs to reduce gin_helper's footprint. One step in this series is to phase out marshalling std::optional<T> args through gin_helper, and this PR does that for App::SetAppLogPath().

All reviews welcome! CC @codebytere as gin_helper stakeholder & as author of the code being refactored here

Checklist

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

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