Skip to content

Use weak refs between WebSockets in a WebSocketPair - #2161

Merged
jasnell merged 1 commit into
mainfrom
jsnell/fixup-websocket-ref-cycle
May 24, 2024
Merged

Use weak refs between WebSockets in a WebSocketPair#2161
jasnell merged 1 commit into
mainfrom
jsnell/fixup-websocket-ref-cycle

Conversation

@jasnell

@jasnell jasnell commented May 24, 2024

Copy link
Copy Markdown
Collaborator

Breaks the strong ref cycle between the two WebSockets in a WebSocketPair.

Aso, while at it, add a missing visitForGc impl to WebSocket to make sure the stored error, if any, is traced.

@jasnell
jasnell requested review from a team as code owners May 24, 2024 18:58

@cacheburner cacheburner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, James!

Comment thread src/workerd/api/web-socket.c++ Outdated
Comment thread src/workerd/api/web-socket.c++ Outdated
Comment thread src/workerd/api/web-socket.c++ Outdated
@jasnell
jasnell force-pushed the jsnell/fixup-websocket-ref-cycle branch 2 times, most recently from 9f2bc8f to b896484 Compare May 24, 2024 20:31
Breaks the strong ref cycle between the two WebSockets in a
WebSocketPair.

Aso, while at it, add a missing visitForGc impl to WebSocket
to make sure the stored error, if any, is traced.
@jasnell
jasnell force-pushed the jsnell/fixup-websocket-ref-cycle branch from b896484 to 6fe51b1 Compare May 24, 2024 20:53
@jasnell
jasnell merged commit 1d89f3b into main May 24, 2024
@jasnell
jasnell deleted the jsnell/fixup-websocket-ref-cycle branch May 24, 2024 21:16
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.

4 participants