mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09: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:
parent
9724c67be2
commit
8f6fe1de83
Notes:
github-actions[bot]
2024-11-23 15:44:52 +00:00
Author: https://github.com/shannonbooth
Commit: 8f6fe1de83
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2518
15 changed files with 24 additions and 30 deletions
|
@ -83,12 +83,10 @@ void WindowOrWorkerGlobalScopeMixin::finalize()
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-origin
|
||||
WebIDL::ExceptionOr<String> WindowOrWorkerGlobalScopeMixin::origin() const
|
||||
String WindowOrWorkerGlobalScopeMixin::origin() const
|
||||
{
|
||||
auto& vm = this_impl().vm();
|
||||
|
||||
// The origin getter steps are to return this's relevant settings object's origin, serialized.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_byte_string(relevant_settings_object(this_impl()).origin().serialize()));
|
||||
return relevant_settings_object(this_impl()).origin().serialize();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-issecurecontext
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue