bootstrap: --frozen-intrinsics override workaround
So it turns out I've been doing it wrong this whole time and SES already has a solution to the "override problem".
This adopts the approach taken in https://github.com/tc39/proposal-ses/blob/e5271cc42a257a05dcae2fd94713ed2f46c08620/shim/src/mutable.js, which is to turn all intrinsic prototype value properties into getters and setters, with the setter updating the object as if it were still a value property in the override case.
This then gets all those edge cases that were previously documented with work-arounds to work out correctly, meaning that most third-party code becomes compatible with this flag. I just tested this on a large Node.js application and everything worked fine! I've also re-enabled the freezing of error prototypes and console now that these are supported.
Thanks @erights for the pointer on this one.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines