summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings/LocationObject.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Bindings/LocationObject.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
index a1091c9102..37d388e2cf 100644
--- a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
@@ -23,9 +23,18 @@ namespace Web::Bindings {
// https://html.spec.whatwg.org/multipage/history.html#the-location-interface
LocationObject::LocationObject(JS::Realm& realm)
- : Object(verify_cast<HTML::Window>(realm.global_object()).cached_web_prototype("Location"))
- , m_default_properties(heap())
+ : PlatformObject(realm)
{
+ set_prototype(&verify_cast<HTML::Window>(realm.global_object()).cached_web_prototype("Location"));
+}
+
+LocationObject::~LocationObject() = default;
+
+void LocationObject::visit_edges(Cell::Visitor& visitor)
+{
+ Base::visit_edges(visitor);
+ for (auto& property : m_default_properties)
+ visitor.visit(property);
}
void LocationObject::initialize(JS::Realm& realm)