fix (websocket): ErrorEvent constructor should convert arguments before passing to super()#4439
Open
fix (websocket): ErrorEvent constructor should convert arguments before passing to super()#4439
super()#4439Conversation
…re passing to `super()`
KhafraDev
requested changes
Aug 27, 2025
Member
KhafraDev
left a comment
There was a problem hiding this comment.
This doesn't fix anything. If it does fix something, we need a test.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This fix reorders operations in the ErrorEvent constructor to ensure arguments are converted before being passed to the parent constructor, making the implementation consistent with CloseEvent and MessageEvent constructors.
- Moved argument conversion (webidl.converters calls) to occur before the super() call
- Repositioned the webidl.util.markAsUncloneable() call after super() constructor execution
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
2e8cd5e to
5a01962
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now the order of operations is comparable to CloseEvent and MessageEvent
This relates to...
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status