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

don't retain port in CRSessionClient, remove singleton pattern #2018

Open
wants to merge 1 commit into
base: connection-lifecycle-branch
Choose a base branch
from

Conversation

turbocrime
Copy link
Collaborator

Description of Changes

CRSessionClient of @penumbra-zone/transport-dom no longer retains a MessagePort and no longer uses a singleton pattern.

Related Issue

fixes #1736

Checklist Before Requesting Review

Tested in combination with other work, not yet tested alone.

  • I have ensured that any relevant minifront changes do not cause the existing extension to break.

Copy link

changeset-bot bot commented Feb 4, 2025

⚠️ No Changeset found

Latest commit: 90707e8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@TalDerei TalDerei left a comment

Choose a reason for hiding this comment

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

this is great! went through the CRSessionClient connection flow and left a comment about addressing listener leaks.

packages/transport-chrome/src/session-client.ts Outdated Show resolved Hide resolved
packages/transport-chrome/src/session-client.ts Outdated Show resolved Hide resolved
packages/transport-chrome/src/session-client.ts Outdated Show resolved Hide resolved
packages/transport-chrome/src/session-client.ts Outdated Show resolved Hide resolved
packages/transport-chrome/src/session-client.ts Outdated Show resolved Hide resolved
@TalDerei TalDerei marked this pull request as ready for review February 4, 2025 19:27
@TalDerei TalDerei self-requested a review February 4, 2025 23:06
@TalDerei TalDerei changed the base branch from main to connection-lifecycle-branch February 4, 2025 23:08
Copy link
Contributor

@TalDerei TalDerei left a comment

Choose a reason for hiding this comment

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

changed base branch to connection-lifecycle-branch

we can think more about handling memory leaks separately in the reconnection PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRSessionClient attempts to retain reference to a transferred MessagePort object
2 participants