mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
Commit 1b8e81cd6f added a check to prevent
assigning a default value when the default value itself is null. But we
had previously generated an uninitialized type, expecting it to become
defaulted later on. So we would have generated code such as:
bool value;
if (!property.is_null() && !property.is_undefined())
value = property.to_boolean();
options.value = value;
This is undefined behavior.
We know use the same default value check to ensure we generate Optional
types instead. So the above `value` initializer becomes:
Optional<bool> value;