mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
This commit is contained in:
parent
1df3652e27
commit
7c0c1c8f49
214 changed files with 825 additions and 827 deletions
|
@ -15,7 +15,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::href() const
|
|||
{
|
||||
auto& vm = realm().vm();
|
||||
// The href getter steps are to return this's WorkerGlobalScope object's url, serialized.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope.url().serialize()));
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope->url().serialize()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-workerlocation-origin
|
||||
|
@ -23,7 +23,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::origin() const
|
|||
{
|
||||
auto& vm = realm().vm();
|
||||
// The origin getter steps are to return the serialization of this's WorkerGlobalScope object's url's origin.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope.url().serialize_origin()));
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope->url().serialize_origin()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-workerlocation-protocol
|
||||
|
@ -31,7 +31,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::protocol() const
|
|||
{
|
||||
auto& vm = realm().vm();
|
||||
// The protocol getter steps are to return this's WorkerGlobalScope object's url's scheme, followed by ":".
|
||||
return TRY_OR_THROW_OOM(vm, String::formatted("{}:", m_global_scope.url().scheme().view()));
|
||||
return TRY_OR_THROW_OOM(vm, String::formatted("{}:", m_global_scope->url().scheme().view()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-workerlocation-host
|
||||
|
@ -41,7 +41,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::host() const
|
|||
|
||||
// The host getter steps are:
|
||||
// 1. Let url be this's WorkerGlobalScope object's url.
|
||||
auto const& url = m_global_scope.url();
|
||||
auto const& url = m_global_scope->url();
|
||||
|
||||
// 2. If url's host is null, return the empty string.
|
||||
if (url.host().is_empty())
|
||||
|
@ -62,7 +62,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::hostname() const
|
|||
|
||||
// The hostname getter steps are:
|
||||
// 1. Let host be this's WorkerGlobalScope object's url's host.
|
||||
auto const& host = m_global_scope.url().host();
|
||||
auto const& host = m_global_scope->url().host();
|
||||
|
||||
// 2. If host is null, return the empty string.
|
||||
if (host.is_empty())
|
||||
|
@ -79,7 +79,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::port() const
|
|||
|
||||
// The port getter steps are:
|
||||
// 1. Let port be this's WorkerGlobalScope object's url's port.
|
||||
auto const& port = m_global_scope.url().port();
|
||||
auto const& port = m_global_scope->url().port();
|
||||
|
||||
// 2. If port is null, return the empty string.
|
||||
if (!port.has_value())
|
||||
|
@ -93,7 +93,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::pathname() const
|
|||
{
|
||||
auto& vm = realm().vm();
|
||||
// The pathname getter steps are to return the result of URL path serializing this's WorkerGlobalScope object's url.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope.url().path()));
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope->url().path()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-workerlocation-search
|
||||
|
@ -103,7 +103,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::search() const
|
|||
|
||||
// The search getter steps are:
|
||||
// 1. Let query be this's WorkerGlobalScope object's url's query.
|
||||
auto const& query = m_global_scope.url().query();
|
||||
auto const& query = m_global_scope->url().query();
|
||||
|
||||
// 2. If query is either null or the empty string, return the empty string.
|
||||
if (query.is_empty())
|
||||
|
@ -120,7 +120,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::hash() const
|
|||
|
||||
// The hash getter steps are:
|
||||
// 1. Let fragment be this's WorkerGlobalScope object's url's fragment.
|
||||
auto const& fragment = m_global_scope.url().fragment();
|
||||
auto const& fragment = m_global_scope->url().fragment();
|
||||
|
||||
// 2. If fragment is either null or the empty string, return the empty string.
|
||||
if (fragment.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue