Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR moves WebSocket close() code/reason validation before readyState checks and changes the error type from TypeError to InvalidAccessError, fixing spec compliance and enabling more WPT tests to pass.
Issues
- [HIGH] Ungated behavioral change — error type and ordering. Two observable behaviors change here without a compat flag: (a) the exception type switches from
TypeErrortoInvalidAccessError, and (b) validation now runs before readyState/state checks, meaningclose(9999)on an already-closed socket will throw instead of silently returning. Both changes are spec-correct, but existing Workers thatcatch (e) { if (e instanceof TypeError) ... }or rely on the silent-return path will break. Per workerd's backward compat commitment, these should be gated behind a compatibility flag.
Note: these comments are generated by an AI assistant and may not be perfect. Please evaluate them critically.
|
I'm Bonk, and I've done a quick review of your PR. This PR moves WebSocket Issue found (HIGH severity): The PR makes two ungated observable behavioral changes: (1) the exception type switches from Review posted to the PR with an inline comment on the affected code. |
dom96
left a comment
There was a problem hiding this comment.
See comment, otherwise LGTM
This comment was marked as outdated.
This comment was marked as outdated.
0282c3d to
090e3bc
Compare
090e3bc to
fe090df
Compare
No description provided.