mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:07:34 +00:00
LibWeb: Make factory method of URL::URLSearchParams fallible
This commit is contained in:
parent
71316614b8
commit
35622606c1
2 changed files with 3 additions and 3 deletions
|
@ -89,9 +89,9 @@ Vector<QueryParam> url_decode(StringView input)
|
|||
return output;
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<URLSearchParams> URLSearchParams::create(JS::Realm& realm, Vector<QueryParam> list)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<URLSearchParams>> URLSearchParams::create(JS::Realm& realm, Vector<QueryParam> list)
|
||||
{
|
||||
return realm.heap().allocate<URLSearchParams>(realm, realm, move(list)).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<URLSearchParams>(realm, realm, move(list)));
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlsearchparams-urlsearchparams
|
||||
|
|
|
@ -23,7 +23,7 @@ class URLSearchParams : public Bindings::PlatformObject {
|
|||
WEB_PLATFORM_OBJECT(URLSearchParams, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<URLSearchParams> create(JS::Realm&, Vector<QueryParam> list);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<URLSearchParams>> create(JS::Realm&, Vector<QueryParam> list);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<URLSearchParams>> construct_impl(JS::Realm&, Variant<Vector<Vector<DeprecatedString>>, OrderedHashMap<DeprecatedString, DeprecatedString>, DeprecatedString> const& init);
|
||||
|
||||
virtual ~URLSearchParams() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue