summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/URL
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-14 17:40:33 +0000
committerTim Flynn <trflynn89@pm.me>2022-12-15 06:56:37 -0500
commit22089436edec780e03960ecaa74bfc4930126534 (patch)
treef60662c28d36e8fcce4b734e09af396c68ed1aaf /Userland/Libraries/LibWeb/URL
parent2a66fc6cae8ef09e780cd795bf0b1d7f8844f4ec (diff)
downloadserenity-22089436edec780e03960ecaa74bfc4930126534.zip
LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibWeb/URL')
-rw-r--r--Userland/Libraries/LibWeb/URL/URL.cpp2
-rw-r--r--Userland/Libraries/LibWeb/URL/URLSearchParams.cpp2
-rw-r--r--Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/URL/URL.cpp b/Userland/Libraries/LibWeb/URL/URL.cpp
index b0fbe54fac..c52a3b4921 100644
--- a/Userland/Libraries/LibWeb/URL/URL.cpp
+++ b/Userland/Libraries/LibWeb/URL/URL.cpp
@@ -15,7 +15,7 @@ namespace Web::URL {
JS::NonnullGCPtr<URL> URL::create(JS::Realm& realm, AK::URL url, JS::NonnullGCPtr<URLSearchParams> query)
{
- return *realm.heap().allocate<URL>(realm, realm, move(url), move(query));
+ return realm.heap().allocate<URL>(realm, realm, move(url), move(query));
}
WebIDL::ExceptionOr<JS::NonnullGCPtr<URL>> URL::construct_impl(JS::Realm& realm, DeprecatedString const& url, DeprecatedString const& base)
diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp
index 808380be92..f5766c6337 100644
--- a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp
+++ b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp
@@ -84,7 +84,7 @@ Vector<QueryParam> url_decode(StringView input)
JS::NonnullGCPtr<URLSearchParams> URLSearchParams::create(JS::Realm& realm, Vector<QueryParam> list)
{
- return *realm.heap().allocate<URLSearchParams>(realm, realm, move(list));
+ return realm.heap().allocate<URLSearchParams>(realm, realm, move(list));
}
// https://url.spec.whatwg.org/#dom-urlsearchparams-urlsearchparams
diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp b/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp
index f8cc777bfa..902dd499b4 100644
--- a/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp
+++ b/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp
@@ -14,7 +14,7 @@ namespace Web::URL {
JS::NonnullGCPtr<URLSearchParamsIterator> URLSearchParamsIterator::create(URLSearchParams const& url_search_params, JS::Object::PropertyKind iteration_kind)
{
- return *url_search_params.heap().allocate<URLSearchParamsIterator>(url_search_params.realm(), url_search_params, iteration_kind);
+ return url_search_params.heap().allocate<URLSearchParamsIterator>(url_search_params.realm(), url_search_params, iteration_kind);
}
URLSearchParamsIterator::URLSearchParamsIterator(URLSearchParams const& url_search_params, JS::Object::PropertyKind iteration_kind)