mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449. While going through these, I also changed the function signature in many places where returning ThrowCompletionOr<T> is no longer necessary.
This commit is contained in:
parent
980e7164fe
commit
72c9f56c66
337 changed files with 1229 additions and 1251 deletions
|
@ -33,7 +33,7 @@ class Response final
|
|||
WEB_PLATFORM_OBJECT(Response, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> create(JS::Realm&, JS::NonnullGCPtr<Infrastructure::Response>, Headers::Guard);
|
||||
[[nodiscard]] static JS::NonnullGCPtr<Response> create(JS::Realm&, JS::NonnullGCPtr<Infrastructure::Response>, Headers::Guard);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> construct_impl(JS::Realm&, Optional<BodyInit> const& body = {}, ResponseInit const& init = {});
|
||||
|
||||
virtual ~Response() override;
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
[[nodiscard]] JS::NonnullGCPtr<Infrastructure::Response> response() const { return m_response; }
|
||||
|
||||
// JS API functions
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> error(JS::VM&);
|
||||
[[nodiscard]] static JS::NonnullGCPtr<Response> error(JS::VM&);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> redirect(JS::VM&, String const& url, u16 status);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> json(JS::VM&, JS::Value data, ResponseInit const& init = {});
|
||||
[[nodiscard]] Bindings::ResponseType type() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue