-
Notifications
You must be signed in to change notification settings - Fork 75
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
Document how-to-harden console #292
Comments
Experimenting just now, in Node, Chrome, Firefox, and Safari, I see agreement on a common behavior that I did not expect. On all, the methods on On all, These symptoms look like they are about that empty object. Before you |
Yep, that seems to fix it, at least within Node. Thanks! Sounds like we don't need any changes in SES to accomodate this, but if we're building up some usage documentation, this would go nicely in a "How Do I Make x.. Work Under SES?" section. |
Is there a reason |
Yes. Originally it did but we changed it. Let's talk tomorrow. |
@erights and @kriskowal, please attend to this, it may have fallen off your task list. It is breaking SyntaxError error reporting in the REPL. Here's me typing in a single close-paren:
which never produces a result. The error reported in the
|
It looks like the fix is sitting on main/master and ready to release. I’ll float that to the top of my tasks today. |
This has been addressed and the fix released. |
[edit @kriskowal 2020-08-13]
Somewhere, document that the console object in Node.js can be hardened by:
This program:
when run under SES-0.7.7, fails as it tries to harden the console:
I'm guessing that
console
's prototype is still pointing at the original Object, not the tamed one, and we replace Object with a tamed version, and the tamed Object's prototype is in the fringe.I need this to create new Compartments, give them a
console
endowment, and then harden their globals:I can work around this by wrapping
console
in a new object, which I used to do under old-SES to prevent Realm leakage, but it'd be nice if we didn't have to do that now.The text was updated successfully, but these errors were encountered: