forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb/CSS: Make CSSNumericType dump() infallible
This is a remnant of the tiny-OOM-propagation party.
- Loading branch information
1 parent
9cbd08a
commit 0d19007
Showing
3 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,15 +159,15 @@ OwnPtr<CalculationNode> Parser::parse_math_function(PropertyID property_id, Func | |
function_generator.set("type_check", generate_calculation_type_check("argument_type"sv, parameter_type_string)); | ||
function_generator.append(R"~~~( | ||
if (!(@type_check@)) { | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument #{} type ({}) is not an accepted type", parsed_arguments.size(), MUST(argument_type.dump())); | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument #{} type ({}) is not an accepted type", parsed_arguments.size(), argument_type.dump()); | ||
return nullptr; | ||
} | ||
if (parsed_arguments.is_empty()) { | ||
determined_argument_type = move(argument_type); | ||
} else { | ||
if (determined_argument_type != argument_type) { | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument #{} type ({}) doesn't match type of previous arguments ({})", parsed_arguments.size(), MUST(argument_type.dump()), MUST(determined_argument_type.dump())); | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument #{} type ({}) doesn't match type of previous arguments ({})", parsed_arguments.size(), argument_type.dump(), determined_argument_type.dump()); | ||
return nullptr; | ||
} | ||
} | ||
|
@@ -287,7 +287,7 @@ OwnPtr<CalculationNode> Parser::parse_math_function(PropertyID property_id, Func | |
auto argument_type_@parameter_index@ = maybe_argument_type_@[email protected]_value(); | ||
if (!(@type_check@)) { | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument '@parameter_name@' type ({}) is not an accepted type", MUST(argument_type_@[email protected]())); | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument '@parameter_name@' type ({}) is not an accepted type", argument_type_@[email protected]()); | ||
return nullptr; | ||
} | ||
)~~~"); | ||
|
@@ -297,7 +297,7 @@ OwnPtr<CalculationNode> Parser::parse_math_function(PropertyID property_id, Func | |
if (previous_parameter_type_string == parameter_type_string) { | ||
parameter_generator.append(R"~~~( | ||
if (argument_type_@parameter_index@ != previous_argument_type) { | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument '@parameter_name@' type ({}) doesn't match type of previous arguments ({})", MUST(argument_type_@[email protected]()), MUST(previous_argument_type.dump())); | ||
dbgln_if(CSS_PARSER_DEBUG, "@name:lowercase@() argument '@parameter_name@' type ({}) doesn't match type of previous arguments ({})", argument_type_@[email protected](), previous_argument_type.dump()); | ||
return nullptr; | ||
} | ||
)~~~"); | ||
|