summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-23 16:46:57 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-23 16:46:57 +0200
commitb91c49364df1683c7fe1191eb02b8d9c331874f6 (patch)
treea9ea5ff8e4cc8cfcfe75c279551be35793d0ffb3 /Userland/Libraries/LibWeb/Loader
parentb3db01e20eeae632cc75df9af8666772bda67091 (diff)
downloadserenity-b91c49364df1683c7fe1191eb02b8d9c331874f6.zip
AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
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)