diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Location.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Location.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Location.cpp b/Userland/Libraries/LibWeb/HTML/Location.cpp index 04714e5e52..d9d6ccaddb 100644 --- a/Userland/Libraries/LibWeb/HTML/Location.cpp +++ b/Userland/Libraries/LibWeb/HTML/Location.cpp @@ -35,9 +35,9 @@ void Location::visit_edges(Cell::Visitor& visitor) visitor.visit(property); } -void Location::initialize(JS::Realm& realm) +JS::ThrowCompletionOr<void> Location::initialize(JS::Realm& realm) { - Object::initialize(realm); + MUST_OR_THROW_OOM(Object::initialize(realm)); set_prototype(&Bindings::ensure_web_prototype<Bindings::LocationPrototype>(realm, "Location")); // FIXME: Implement steps 2.-4. @@ -45,6 +45,8 @@ void Location::initialize(JS::Realm& realm) // 5. Set the value of the [[DefaultProperties]] internal slot of location to location.[[OwnPropertyKeys]](). // NOTE: In LibWeb this happens before the ESO is set up, so we must avoid location's custom [[OwnPropertyKeys]]. m_default_properties.extend(MUST(Object::internal_own_property_keys())); + + return {}; } // https://html.spec.whatwg.org/multipage/history.html#relevant-document |