-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
[Merged by Bors] - Fix super call execution order #2724
Conversation
Test262 conformance changes
|
Codecov Report
@@ Coverage Diff @@
## main #2724 +/- ##
==========================================
+ Coverage 50.45% 50.84% +0.38%
==========================================
Files 395 398 +3
Lines 39810 39942 +132
==========================================
+ Hits 20085 20307 +222
+ Misses 19725 19635 -90
... and 24 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this case with V8 and SM but V8 throws instead of returning true
, and seeing that there are no test262 tests affected by this change, it seems like this behaviour is not specified by the spec. Should we open an issue on ecma262 before committing to this behaviour?
The two tests that I added result in the expected results in both SM and V8 for me.
We currently do step 4 before we fo the rest and that causes the panics / wrong results. |
Ah, so the spec does specify this behaviour! Then it seems like SpiderMonkey: V8:
EDIT: Realized the behaviour is the opposite, it shouldn't throw because it gets the constructor before calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
bors r+ |
This Pull Request fixes/closes #2672. It changes the following: - Get the super constructor and the new target before executing arguments in super calls.
Pull request successfully merged into main. Build succeeded: |
This Pull Request fixes/closes #2672.
It changes the following: