mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 23:25:06 +00:00
LibWeb: Make HTML::ImageRequest GC allocated
This commit is contained in:
parent
333949894e
commit
bbfedf2e5a
4 changed files with 27 additions and 15 deletions
|
@ -19,9 +19,9 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
ErrorOr<NonnullRefPtr<ImageRequest>> ImageRequest::create(Page& page)
|
||||
JS::NonnullGCPtr<ImageRequest> ImageRequest::create(JS::Realm& realm, Page& page)
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) ImageRequest(page));
|
||||
return realm.heap().allocate<ImageRequest>(realm, page);
|
||||
}
|
||||
|
||||
ImageRequest::ImageRequest(Page& page)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue