mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
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:
parent
5f9a36feac
commit
175f3febb8
Notes:
github-actions[bot]
2024-10-12 19:15:13 +00:00
Author: https://github.com/awesomekling
Commit: 175f3febb8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1743
Reviewed-by: https://github.com/ADKaster
89 changed files with 464 additions and 462 deletions
|
@ -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 fr’s 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 fr’s state to "loading".
|
||||
m_state = State::Loading;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue