1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

LibWeb: Make ImageRequest store Page member as NonnullGCPtr

Co-Authored-By: Andreas Kling <kling@serenityos.org>
This commit is contained in:
Shannon Booth 2023-12-03 15:29:11 +13:00 committed by Andreas Kling
parent d277ac72e6
commit 289ea2db9c
2 changed files with 7 additions and 5 deletions

View file

@ -22,7 +22,7 @@ class ImageRequest final : public JS::Cell {
JS_DECLARE_ALLOCATOR(ImageRequest);
public:
[[nodiscard]] static JS::NonnullGCPtr<ImageRequest> create(JS::Realm&, Page&);
[[nodiscard]] static JS::NonnullGCPtr<ImageRequest> create(JS::Realm&, JS::NonnullGCPtr<Page>);
~ImageRequest();
@ -63,9 +63,9 @@ public:
virtual void visit_edges(JS::Cell::Visitor&) override;
private:
explicit ImageRequest(Page&);
explicit ImageRequest(JS::NonnullGCPtr<Page>);
Page& m_page;
JS::NonnullGCPtr<Page> m_page;
// https://html.spec.whatwg.org/multipage/images.html#img-req-state
// An image request's state is initially unavailable.