mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:57:35 +00:00
LibWeb: VERIFY that nobody tries to hash a non-finite CSSPixels value
Non-finite CSSPixels quantities should never make their way into hash tables. If this ever happens, let's catch it closer to the source instead of letting things cascade into confusion.
This commit is contained in:
parent
7e4db556eb
commit
134717ec8f
1 changed files with 1 additions and 0 deletions
|
@ -127,6 +127,7 @@ template<>
|
||||||
struct Traits<Web::CSSPixels> : public GenericTraits<Web::CSSPixels> {
|
struct Traits<Web::CSSPixels> : public GenericTraits<Web::CSSPixels> {
|
||||||
static unsigned hash(Web::CSSPixels const& key)
|
static unsigned hash(Web::CSSPixels const& key)
|
||||||
{
|
{
|
||||||
|
VERIFY(isfinite(key.value()));
|
||||||
return Traits<Web::CSSPixels::Type>::hash(key.value());
|
return Traits<Web::CSSPixels::Type>::hash(key.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue