ladybird/Tests/LibJS
Timothy Flynn edaed9adfa LibJS: Protect DateParser from non-ASCII input
DateParser is a GenericLexer, which is not particularly UTF-8 aware.
Other engines do not accept ASCII input, so let's just reject non-ASCII
strings outright.

While we are here, let's avoid the std ctype header. It is explicitly
undefined behavior to provide code points to isspace, isalpha, etc. that
do not fit in an unsigned char. Although this isn't reachable any longer
let's just nip it in the bud and use our safe AK character types.

Just to demonstrate, the following returns different values for me on
different systems and with different compilers:

    isdigit(0xff01)
    isalpha(0xff01)
    isspace(0xff01)
2026-05-22 17:30:36 +02:00
..
AST LibJS: Fix destructured primitive string const loops 2026-05-22 01:56:57 +02:00
Bytecode LibJS: Preserve strict unresolvable assignment references 2026-05-22 14:30:35 +02:00
Runtime LibJS: Protect DateParser from non-ASCII input 2026-05-22 17:30:36 +02:00
CMakeLists.txt LibJS: Materialize decoded bytecode cache blobs 2026-05-06 08:20:06 +02:00
test-bytecode-cache.cpp LibJS: Test mapped bytecode cache installation 2026-05-22 10:54:44 +02:00
test-js-ast.py LibJS: Support .mjs files in test-js-ast and test-js-bytecode 2026-02-19 12:02:50 +01:00
test-js-bytecode.py LibJS: Support .mjs files in test-js-ast and test-js-bytecode 2026-02-19 12:02:50 +01:00
test-js.cpp LibJS: Cache entry modules before loading imports 2026-05-22 01:56:57 +02:00
test-primitive-string.cpp LibJS: Avoid ropes for short flat string concatenations 2026-04-30 16:25:52 +02:00
test-value-js.cpp LibJS: Make Value() default-construct the undefined value 2025-04-05 11:20:26 +02:00