Closed roytam1 closed 2 years ago
What happened to "don't use eval in strict mode"? Is that not a thing anymore? IIRC having that call somewhere in a module completely disabled JIT, that would be pretty bad.
Edit: The Function()
constructor is fine, apparently. Also marginally faster since we don't actually need to execute the code anyway.
If you run palefill on platform code which just changed version but not getting opchain code in (i.e. https://repo.palemoon.org/MoonchildProductions/UXP/commit/062a5085b12f33e8f7c4bb76bd539bd60f3c3686) then palefill doesn't rewrite optchain code (even platform code returns 5.1.0 but it can't parse optchain javascript code)
instead, feature checking will be better-fit:
(credits: copied and rewrote from https://stackoverflow.com/a/69935847)