Open mhofman opened 11 months ago
For reference, I think v8 does its own changes to Error
for prepareStackTrace
:
For reference, I think v8 does its own changes to Error for prepareStackTrace:
Did you mean Node?
@mhofman You have a stamp and a request from @turadg to include this in the next release.
This does not do what it's supposed to do, back to draft
Hi @mhofman , after this had several approvals, you wrote:
This does not do what it's supposed to do, back to draft
Do you remember what the problems are?
As a draft this PR was not assigned. I went ahead and assigned myself, since I want to look at reviving it. I also left myself on as a reviewer FWIW.
Do you remember what the problems are?
Yeah it didn't solve the problem. I think because Node.js verified that the prepareStackTrace
function was not modified from its own.
closes: #1798
Description
Fixes
Error.prepareStackTrace
with the following behavior changes:errorTaming
is not'unsafe'
depd
and similar that return the callSites arrayError.prepareStackTrace
that existed before SES loaded (e.g. Node.js uses it to enable source maps)Security Considerations
This change defers to a
prepareStackTrace
set in the start compartment to generate SES stack strings. The assumption is that such overrides are vetted.Scaling Considerations
The new implementation uses
try
/catch
which is often more expensive, but it likely dwarfs in comparison to the call sites wrapping we are already doing.Documentation Considerations
How should this change be documented? I somewhat expected this to be the behavior in the first place
Testing Considerations
Passes existing unit test.
Upgrade Considerations
None