-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
bootstrap: unfreeze console under --frozen-intrinsics #27663
bootstrap: unfreeze console under --frozen-intrinsics #27663
Conversation
|
7c18dc3
to
c28bbb0
Compare
The doc fix is great, though since its unrelated to the code fix, I think it would be better as a seperate commit, if you are comfortable with splitting it. As for the code fix, you are just excluding |
@sam-github the fix for subclassing console if it were a frozen intrinsics would actually be to use ES6 classes and then define all the properties as undefined class properties: class ConsoleSubclass extends Console {
// all properties would need to be explicitly defined as class properties
log = undefined;
} I think turning Console into a class like the above might also provide a fix in core. We could explore these directions further, I just didn't want to get right into the weeds on this right now. Although we could and perhaps now is the best time to do that too instead of kicking it down the road. |
IIUC what is proposed in #27663 (comment), that means users can no longer do |
what does standardization have to do with security? the issue is whether it exists or not right? am i missing the point of frozen intrinsics? |
@devsnek Being non-standard means there is no explicit guarantee about whether it makes sense to freeze something, because the behavior of it is..well, not standardized. e.g. |
Just cancelled the new CI as this has already run at https://ci.nodejs.org/job/node-test-pull-request/23085/. Apologies for noise! |
Was just going to land this, but |
Co-Authored-By: Rich Trott <[email protected]>
Co-Authored-By: Rich Trott <[email protected]>
Landed in 1a9a577. |
PR-URL: #27663 Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #27663 Reviewed-By: Ruben Bridgewater <[email protected]>
This fixes the bug pointed out by @jdalton in #25685 (comment).
I haven't included an explicit test, because for all intensive purposes we could be testing EVERY global that it works under this flag. Rather the fix is by exclusion.
At the same time I've also added some documentation on how to handle the common errors, which are really only these two cases.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes