proposal-error-stacks icon indicating copy to clipboard operation
proposal-error-stacks copied to clipboard

Why have the System object?

Open mathiasbynens opened this issue 6 years ago • 3 comments

This repository doesn’t seem to mention any rationale for it. It would be good to document it.

mathiasbynens avatar Mar 28 '19 14:03 mathiasbynens

For reasons explained at https://github.com/tc39/proposal-weakrefs/issues/22#issuecomment-491097466 we no longer need a System object, or a standardized whitelist of globals.

erights avatar May 09 '19 23:05 erights

In that case, would getStack and getStackString be able to live on the Error constructor, or for compartment reasons, would they still need a separate global?

ljharb avatar May 10 '19 00:05 ljharb

Still need separate globals. As you pointed out, with System, we'd only need one global, rather than two for error stacks and another two for weakrefs. I would still prefer that. But I am no longer arguing that System is necessary. We can live with four new globals instead.

erights avatar May 10 '19 04:05 erights