mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Make Document::url() return URL by value
Returning it by reference can lead to unpleasant situations if we use this getter when the document may go away. Better to make the getter return a copy than have to think about this everywhere.
This commit is contained in:
@@ -53,7 +53,7 @@ public:
|
||||
virtual ~Document() override;
|
||||
|
||||
void set_url(const URL& url) { m_url = url; }
|
||||
const URL& url() const { return m_url; }
|
||||
URL url() const { return m_url; }
|
||||
|
||||
Origin origin() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user