summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-10 22:38:08 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-11 00:21:49 +0100
commited84fbce474a86721ff85aa9559213e12bd556ba (patch)
treee87ff19b4581c0c5206a0d40831ed392b591c3ba /Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp
parent702cee3d7c36570763c5552461b9665f557bf9cc (diff)
downloadserenity-ed84fbce474a86721ff85aa9559213e12bd556ba.zip
LibWeb: Make Paintable ref-counted
This will allow us to use a protective NonnullRefPtr to keep paintables alive while running arbitrary JavaScript in response to events.
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp b/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp
index 2493c210f2..a1831429fd 100644
--- a/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp
+++ b/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp
@@ -10,9 +10,9 @@
namespace Web::Painting {
-NonnullOwnPtr<MarkerPaintable> MarkerPaintable::create(Layout::ListItemMarkerBox const& layout_box)
+NonnullRefPtr<MarkerPaintable> MarkerPaintable::create(Layout::ListItemMarkerBox const& layout_box)
{
- return adopt_own(*new MarkerPaintable(layout_box));
+ return adopt_ref(*new MarkerPaintable(layout_box));
}
MarkerPaintable::MarkerPaintable(Layout::ListItemMarkerBox const& layout_box)