ladybird/Tests/LibJS
Timothy Flynn f630a5ca71 AK+LibJS: Remove error-prone JsonValue constructor
Consider the following:

    JsonValue value { JsonValue::Type::Object };
    value.as_object().set("foo"sv, "bar"sv);

The JsonValue(Type) constructor does not initialize the underlying union
that stores its value. Thus JsonValue::as_object() will A) refer to an
uninitialized union member, B) deference that member.

This constructor only has 2 users, both of which initialize the type to
Type::Null. Rather than implementing unused functionality here, replace
those uses with the default JsonValue constructor, and remove the faulty
constructor.
2023-11-01 11:15:26 -04:00
..
CMakeLists.txt Tests: Remove test-bytecode-js 2023-06-22 21:16:17 +02:00
test-invalid-unicode-js.cpp Userland+Tests: Remove a few more LibJS/{AST.h,Parser.h} includes 2022-11-23 16:05:59 +00:00
test-js.cpp LibJS: Remove the isBytecodeInterpreterEnabled built-in 2023-08-09 20:47:44 +01:00
test-test262.cpp LibCore: Port Command::write_lines to ErrorOr 2023-07-18 14:48:45 +01:00
test-value-js.cpp LibJS: Inline fast case for Value::to_{boolean,number,numeric,primitive} 2023-10-07 07:13:52 +02:00
test262-runner.cpp AK+LibJS: Remove error-prone JsonValue constructor 2023-11-01 11:15:26 -04:00