You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What should the behavior of Error.captureStackTrace be when the object provided is an object with an [[ErrorData]] slot?
My preference right now would be to reset the internal error stack info, but not add a new private field or own stack property (this is partially assuming that we standardize a prototype stack property for Errors in https://github.com/tc39/proposal-error-stacks)
The text was updated successfully, but these errors were encountered:
I think my current implementation simply does [[Define]] a new property -- my current implementation doesn't do anything special with the [[ErrorData]] slot.
As a result you'll get a string valued own property "stack" on the provided object with the truncated stack string.
Using the prototype getter you could still get the un-truncated stack (and if we have code in let's say devtools that explicitly manipulates [[ErrorData]] (no idea if we do) they would ignore the own property. d
For the SES purposes, since both Error.prototype.stack and Error.captureStack trace are deniable, I think this is fine behaviour.
What should the behavior of
Error.captureStackTrace
be when the object provided is an object with an[[ErrorData]]
slot?My preference right now would be to reset the internal error stack info, but not add a new private field or own stack property (this is partially assuming that we standardize a prototype stack property for Errors in https://github.com/tc39/proposal-error-stacks)
The text was updated successfully, but these errors were encountered: