LibWeb: Make DOMException take error message as a String

There was no need to use FlyString for error messages, and it just
caused a bunch of churn since these strings typically only existed
during the lifetime of the error.
This commit is contained in:
Andreas Kling 2024-10-12 20:56:21 +02:00 committed by Andreas Kling
parent 5f9a36feac
commit 175f3febb8
Notes: github-actions[bot] 2024-10-12 19:15:13 +00:00
89 changed files with 464 additions and 462 deletions

View file

@ -105,7 +105,7 @@ WebIDL::ExceptionOr<FileReader::Result> FileReader::blob_package_data(JS::Realm&
return JS::ArrayBuffer::create(realm, move(bytes));
case Type::BinaryString:
// FIXME: Return bytes as a binary string, in which every byte is represented by a code unit of equal value [0..255].
return WebIDL::NotSupportedError::create(realm, "BinaryString not supported yet"_fly_string);
return WebIDL::NotSupportedError::create(realm, "BinaryString not supported yet"_string);
}
VERIFY_NOT_REACHED();
}
@ -118,7 +118,7 @@ WebIDL::ExceptionOr<void> FileReader::read_operation(Blob& blob, Type type, Opti
// 1. If frs state is "loading", throw an InvalidStateError DOMException.
if (m_state == State::Loading)
return WebIDL::InvalidStateError::create(realm, "Read already in progress"_fly_string);
return WebIDL::InvalidStateError::create(realm, "Read already in progress"_string);
// 2. Set frs state to "loading".
m_state = State::Loading;