From 0a556ae26d13c3f918346ab6b550bbb5eee0941e Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 12 Apr 2023 23:20:27 +0200 Subject: [PATCH] LibWeb/URL: Make URL::search_params() return a NonnullGCPtr --- Userland/Libraries/LibWeb/URL/URL.cpp | 2 +- Userland/Libraries/LibWeb/URL/URL.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/URL/URL.cpp b/Userland/Libraries/LibWeb/URL/URL.cpp index 88ee2a4bad..36050917c7 100644 --- a/Userland/Libraries/LibWeb/URL/URL.cpp +++ b/Userland/Libraries/LibWeb/URL/URL.cpp @@ -400,7 +400,7 @@ WebIDL::ExceptionOr URL::set_search(String const& search) } // https://url.spec.whatwg.org/#dom-url-searchparams -URLSearchParams const* URL::search_params() const +JS::NonnullGCPtr URL::search_params() const { // The searchParams getter steps are to return this’s query object. return m_query; diff --git a/Userland/Libraries/LibWeb/URL/URL.h b/Userland/Libraries/LibWeb/URL/URL.h index e17d556f7a..3043c9d7ad 100644 --- a/Userland/Libraries/LibWeb/URL/URL.h +++ b/Userland/Libraries/LibWeb/URL/URL.h @@ -55,7 +55,7 @@ public: WebIDL::ExceptionOr search() const; WebIDL::ExceptionOr set_search(String const&); - URLSearchParams const* search_params() const; + JS::NonnullGCPtr search_params() const; WebIDL::ExceptionOr hash() const; void set_hash(String const&);