Subject: | Rationale for using bytes::length |
In SpiderMonkey.pm, in the "eval" routine, there is a line like this:
$] > 5.007 ? bytes::length($script) : length($script),
What is the rationale for using bytes::length here? If the user inputs
Unicode-encoded (UTF-8 encoded) string, which is the only case which
requires bytes::length, then shouldn't JS::SM encode the stuff into
Unicode and then call JS_EvaluateUCScript? Or does JS_EvaluateUCScript not
really work anyway? In which case, shouldn't JS::SM change the UTF-8 into
bytes? Either way, this bytes::length doesn't look right.