mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-02 22:29:10 +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
Notes:
sideshowbarker
2024-07-17 07:16:27 +09:00
Author: https://github.com/awesomekling
Commit: 134717ec8f
Pull-request: https://github.com/SerenityOS/serenity/pull/18681
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue