mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
f630a5ca71
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. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
test-invalid-unicode-js.cpp | ||
test-js.cpp | ||
test-test262.cpp | ||
test-value-js.cpp | ||
test262-runner.cpp |