mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 08:31:51 +00:00
Revert "LibJS+LibWeb: Return Vector<PropertyKey> from…
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
internal_own_property_keys"
This reverts commit 5ee810f772
.
This commit is contained in:
parent
8cd9275416
commit
2903defcfc
Notes:
github-actions[bot]
2025-05-16 05:34:06 +00:00
Author: https://github.com/tcl3
Commit: 2903defcfc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4763
24 changed files with 155 additions and 134 deletions
|
@ -228,12 +228,15 @@ JS::ThrowCompletionOr<bool> WindowProxy::internal_delete(JS::PropertyKey const&
|
|||
}
|
||||
|
||||
// 7.4.10 [[OwnPropertyKeys]] ( ), https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-ownpropertykeys
|
||||
JS::ThrowCompletionOr<Vector<JS::PropertyKey>> WindowProxy::internal_own_property_keys() const
|
||||
JS::ThrowCompletionOr<GC::RootVector<JS::Value>> WindowProxy::internal_own_property_keys() const
|
||||
{
|
||||
auto& event_loop = main_thread_event_loop();
|
||||
auto& vm = event_loop.vm();
|
||||
|
||||
// 1. Let W be the value of the [[Window]] internal slot of this.
|
||||
|
||||
// 2. Let keys be a new empty List.
|
||||
Vector<JS::PropertyKey> keys;
|
||||
auto keys = GC::RootVector<JS::Value> { vm.heap() };
|
||||
|
||||
// 3. Let maxProperties be W's associated Document's document-tree child navigables's size.
|
||||
auto max_properties = m_window->associated_document().document_tree_child_navigables().size();
|
||||
|
@ -242,7 +245,7 @@ JS::ThrowCompletionOr<Vector<JS::PropertyKey>> WindowProxy::internal_own_propert
|
|||
// 5. Repeat while index < maxProperties,
|
||||
for (size_t i = 0; i < max_properties; ++i) {
|
||||
// 1. Add ! ToString(index) as the last element of keys.
|
||||
keys.append(String::number(i));
|
||||
keys.append(JS::PrimitiveString::create(vm, ByteString::number(i)));
|
||||
|
||||
// 2. Increment index by 1.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue