1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

LibWeb: Make DOMException GC-allocated

This commit is contained in:
Andreas Kling 2022-09-04 16:56:15 +02:00
parent 0e47754ac8
commit 497ead37bc
58 changed files with 307 additions and 278 deletions

View file

@ -234,9 +234,9 @@ void DOMTokenList::set_value(String value)
ExceptionOr<void> DOMTokenList::validate_token(StringView token) const
{
if (token.is_empty())
return SyntaxError::create("Non-empty DOM tokens are not allowed");
return SyntaxError::create(global_object(), "Non-empty DOM tokens are not allowed");
if (any_of(token, is_ascii_space))
return InvalidCharacterError::create("DOM tokens containing ASCII whitespace are not allowed");
return InvalidCharacterError::create(global_object(), "DOM tokens containing ASCII whitespace are not allowed");
return {};
}