mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibURL+LibWeb: Make URL serialization return a String
This can only ever fail from OOM, and will never by string containing random byte sequences.
This commit is contained in:
committed by
Andreas Kling
parent
9724c67be2
commit
8f6fe1de83
@@ -213,12 +213,10 @@ WebIDL::ExceptionOr<void> DOMURL::set_href(String const& href)
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-url-origin
|
||||
WebIDL::ExceptionOr<String> DOMURL::origin() const
|
||||
String DOMURL::origin() const
|
||||
{
|
||||
auto& vm = realm().vm();
|
||||
|
||||
// The origin getter steps are to return the serialization of this’s URL’s origin. [HTML]
|
||||
return TRY_OR_THROW_OOM(vm, String::from_byte_string(m_url.origin().serialize()));
|
||||
return m_url.origin().serialize();
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-url-protocol
|
||||
|
||||
Reference in New Issue
Block a user