mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-16 06:30:41 +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
|
@ -127,6 +127,7 @@ template<>
|
|||
struct Traits<Web::CSSPixels> : public GenericTraits<Web::CSSPixels> {
|
||||
static unsigned hash(Web::CSSPixels const& key)
|
||||
{
|
||||
VERIFY(isfinite(key.value()));
|
||||
return Traits<Web::CSSPixels::Type>::hash(key.value());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue