Skip to content

Remove dead code from node:crypto bindings, JSC/WebCore bindings, uSockets, and llhttp - #37454

Closed
robobun wants to merge 6 commits into
mainfrom
claude/farm/1fb20db1/dead-code-linker-sweep
Closed

Remove dead code from node:crypto bindings, JSC/WebCore bindings, uSockets, and llhttp#37454
robobun wants to merge 6 commits into
mainfrom
claude/farm/1fb20db1/dead-code-linker-sweep

Drop the on_open mention from the QUIC ext() doc comment

2877209
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 11, 2026 in 13m 57s

Code review found 3 potential issues

Found 2 candidates, confirmed 3. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 3
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit packages/bun-usockets/src/quic.h:91 us_quic_pending_connect_s::user is now write-only after removing its accessor
🟡 Nit packages/bun-usockets/src/crypto/openssl.c:2960-2961 Stale 'too' in SNI userdata comment after removing sni_node_t::user

Annotations

Check warning on line 91 in packages/bun-usockets/src/quic.h

See this annotation in the file changed.

@claude claude / Claude Code Review

us_quic_pending_connect_s::user is now write-only after removing its accessor

Removing `us_quic_pending_connect_user()` leaves `us_quic_pending_connect_s::user` write-only (assigned at quic.c:1359, never read), so the `void *user` parameter of `us_quic_socket_context_connect` is now dead too. This PR did the identical cleanup for `sni_node_t::user` when its only reader was removed — the same applies here: drop the field, drop the `void *user` parameter from quic.h/quic.c, and drop the `user: *mut c_void` argument from `Context::connect` and its extern signature (src/uws_s

Check warning on line 2961 in packages/bun-usockets/src/crypto/openssl.c

See this annotation in the file changed.

@claude claude / Claude Code Review

Stale 'too' in SNI userdata comment after removing sni_node_t::user

The word "too" in this comment referred to the immediately-preceding `node->user = user;` assignment, which this PR removes along with the `sni_node_t::user` field. After this PR the SSL_CTX ex_data is the *only* place userdata is stashed (which is precisely why `us_listen_socket_find_server_name_userdata` could be removed), so "too" now implies a second storage location that no longer exists — same class of stale-doc fix this PR already made in Socket.rs (28772091) and ListenSocket.rs. Drop "to