summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Loader/Resource.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
index 40ecda858c..8c1f6dd4c4 100644
--- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
@@ -82,7 +82,7 @@ static bool build_image_document(DOM::Document& document, const ByteBuffer& data
head_element->append_child(title_element);
auto basename = LexicalPath(document.url().path()).basename();
- auto title_text = adopt(*new DOM::Text(document, String::formatted("{} [{}x{}]", basename, bitmap->width(), bitmap->height())));
+ auto title_text = adopt_ref(*new DOM::Text(document, String::formatted("{} [{}x{}]", basename, bitmap->width(), bitmap->height())));
title_element->append_child(title_text);
auto body_element = document.create_element("body");
diff --git a/Userland/Libraries/LibWeb/Loader/Resource.cpp b/Userland/Libraries/LibWeb/Loader/Resource.cpp
index e5bed81e4e..9223145f96 100644
--- a/Userland/Libraries/LibWeb/Loader/Resource.cpp
+++ b/Userland/Libraries/LibWeb/Loader/Resource.cpp
@@ -15,8 +15,8 @@ namespace Web {
NonnullRefPtr<Resource> Resource::create(Badge<ResourceLoader>, Type type, const LoadRequest& request)
{
if (type == Type::Image)
- return adopt(*new ImageResource(request));
- return adopt(*new Resource(type, request));
+ return adopt_ref(*new ImageResource(request));
+ return adopt_ref(*new Resource(type, request));
}
Resource::Resource(Type type, const LoadRequest& request)