There are many places in the codebase that call our implementation of https://tc39.es/ecma262/#sec-parse-script
Approximately zero of these places validate that the input is valid UTF-8.
However, the ECMA262 spec says that the "source text" of ParseScript ( sourceText, realm, hostDefined )
must be ECMAScript Source Text (https://tc39.es/ecma262/#sec-source-text), which is mandated to be valid UTF-8.
So onto the question: Whose job is it to mandate that the script you're passing to ParseScript be UTF-8? The caller? Or can the algorithm look at the input and say "ew, that's not UTF-8, here's a parse error".
Certanitly we shouldn't VERIFY() and crash in a String::from_deprecated_string(source_text).release_value_but_fixme_should_propagate_errors
in ParseText(sourceText, Script)
, like we currently do...
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too