Closed misterdjules closed 5 years ago
Binary add-ons operate in a privileged context. They will have access to any information that is made available by Node.js. This proposal does not require that to be changed.
@michaelficarra can we add this to the spec text to be very clear what is considered privileged context and what isn't?
Would also be possible to add an example on how to access the stack frames using native module?
@ghermeto I do not think it is appropriate for this to appear in the spec text. Hosts are allowed to do anything that is not explicitly restricted within the spec. As long as the spec text does not overbroadly word the restriction on appearance of stack frames, then the hosts have this implicit permission. I urge you to review the spec text in https://github.com/tc39/ecma262/pull/1739 to see if you think the wording is overbroad.
ok, I agree with that... The spec text might not be the right place for it. Maybe the README? I don't want this information to live only on a closed issue.
@ghermeto Do you have a specific suggestion for a change to How does this affect devtools or other methods of inspecting a function's implementation details?? Why don't you just send a PR with what you think needs to be added?
Also, what exactly are you afraid of? Engine implementers are already very aware of their right to do anything that is not explicitly restricted by the spec. Additional text in the README is not going to do anything to help that.
I will send a PR
Reading the following item:
from the proposal's README makes me wonder how this would be implemented in hosts such as Node.js, and what that implementation would mean on whether stack trace information would really be hidden from applications' code.
I would think that any JS VM facility that the Node.js runtime would rely on to log errors' "hidden" stack frames would need to be available/enabled by default, since this is a capability that Node.js developers expect to be enabled without having to run any dev tool that is not enabled by default.
Since any JS VM facility available to Node.js' internals is available to any binary add-on, they would be available to any application's code.
Am I missing something?