Skip to content

Commit 91f9a11

Browse files
LibWeb: Resolve two document-tree child browsing context count FIXMEs
This patch makes use of helpers implemented for window.length to resolve two FIXMEs in WindowProxy previously simply assuming no child browsing contexts :^)
1 parent d4738ef commit 91f9a11

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Userland/Libraries/LibWeb/Bindings/WindowProxy.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> WindowProxy::internal_ge
7272
// 1. Let index be ! ToUint32(P).
7373
auto index = property_key.as_number();
7474

75-
// FIXME: 2. Let maxProperties be the number of document-tree child browsing contexts of W.
76-
size_t max_properties = 0;
75+
// 2. Let maxProperties be the number of document-tree child browsing contexts of W.
76+
auto max_properties = TRY(m_window->document_tree_child_browsing_context_count());
7777

7878
// 3. Let value be undefined.
7979
Optional<JS::Value> value;
@@ -227,8 +227,8 @@ JS::ThrowCompletionOr<JS::MarkedVector<JS::Value>> WindowProxy::internal_own_pro
227227
// 2. Let keys be a new empty List.
228228
auto keys = JS::MarkedVector<JS::Value> { vm.heap() };
229229

230-
// FIXME: 3. Let maxProperties be the number of document-tree child browsing contexts of W.
231-
size_t max_properties = 0;
230+
// 3. Let maxProperties be the number of document-tree child browsing contexts of W.
231+
auto max_properties = TRY(m_window->document_tree_child_browsing_context_count());
232232

233233
// 4. Let index be 0.
234234
// 5. Repeat while index < maxProperties,

0 commit comments

Comments
 (0)