-
Notifications
You must be signed in to change notification settings - Fork 938
fix: avoid override mistake #1939
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
Conversation
|
Can you add a test? |
|
Done. The added |
|
The is exactly the symptom we saw in our own system that led us here. |
|
@mcollina Thanks for considering this change. |
mcollina
left a comment
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.
lgtm
|
There’s a test failure affecting only Windows. Can I trouble a maintainer to re-run that to verify whether this is a flake? |
|
It's the transport tests. I wish I knew why they consistently fail as often as they do. But we can just ignore it for this. |
|
Thanks! |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The assignment at this location was to a
selfobject that inherits from theconsole(or what was theconsolebefore this code ran). This assignment was use to override properties typically inherited fromconsolesuch aserror,warn,info,debug,trace. However, if theconsoleobject it inherits from is frozen, as it is in the ses-shim of HardenedJS, then this assignment fails due to the so-called "override mistake".Changing this assignment to use
Object.definePropertyinstead avoids hitting the override mistake. The additional attributes I include in this changeare only there to preserve equivalence with assignment. But feel free to change them to whatever you'd like. Such changes would not affect the purpose of this PR.