Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Add ElectronBrowserContext::BrowserContexts() #46089

Merged
merged 6 commits into from
Mar 20, 2025

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented Mar 17, 2025

Description of Change

  1. Add a read-only getter so client code can loop through browser contexts w/o knowing about ElectronBrowserContext's internals
  2. Migrate client code to use the new getter
  3. Make ElectronBrowserContext implementation details private

This is to tighten down controls on how ElectronBrowserContext is accessed and to reduce leaking implementation details. Callers should not have mutable access to the context map. Callers shouldn't even need to know the context map exists 🙂

Checklist

Release Notes

Notes: none.

@ckerr ckerr added semver/patch backwards-compatible bug fixes target/36-x-y PR should also be added to the "36-x-y" branch. labels Mar 17, 2025
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 17, 2025
@ckerr ckerr added target/34-x-y PR should also be added to the "34-x-y" branch. target/35-x-y PR should also be added to the "35-x-y" branch. labels Mar 18, 2025
@ckerr ckerr force-pushed the refactor/ElectronBrowserContext.BrowserContexts branch from 2d1f658 to 1e44ee8 Compare March 18, 2025 13:41
@codebytere codebytere changed the title refactor: Add ElectronBrowserContext::BrowserContexts() refactor: Add ElectronBrowserContext::BrowserContexts() Mar 18, 2025
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 18, 2025
@ckerr ckerr force-pushed the refactor/ElectronBrowserContext.BrowserContexts branch from 1e44ee8 to b1fc0ef Compare March 19, 2025 22:18
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@ckerr ckerr merged commit 46967ca into main Mar 20, 2025
58 checks passed
@ckerr ckerr deleted the refactor/ElectronBrowserContext.BrowserContexts branch March 20, 2025 16:17
@release-clerk
Copy link

release-clerk bot commented Mar 20, 2025

No Release Notes

@trop
Copy link
Contributor

trop bot commented Mar 20, 2025

I was unable to backport this PR to "35-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/35-x-y and removed target/35-x-y PR should also be added to the "35-x-y" branch. labels Mar 20, 2025
@trop
Copy link
Contributor

trop bot commented Mar 20, 2025

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

@trop trop bot added in-flight/36-x-y and removed target/36-x-y PR should also be added to the "36-x-y" branch. labels Mar 20, 2025
@trop
Copy link
Contributor

trop bot commented Mar 20, 2025

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

@trop trop bot added in-flight/34-x-y and removed target/34-x-y PR should also be added to the "34-x-y" branch. labels Mar 20, 2025
@trop
Copy link
Contributor

trop bot commented Mar 20, 2025

@ckerr has manually backported this PR to "35-x-y", please check out #46161

@trop trop bot added in-flight/35-x-y merged/36-x-y PR was merged to the "36-x-y" branch. merged/34-x-y PR was merged to the "34-x-y" branch. merged/35-x-y PR was merged to the "35-x-y" branch. and removed needs-manual-bp/35-x-y in-flight/36-x-y in-flight/34-x-y in-flight/35-x-y labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/34-x-y PR was merged to the "34-x-y" branch. merged/35-x-y PR was merged to the "35-x-y" branch. merged/36-x-y PR was merged to the "36-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants