mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Revert "LibJS+LibWeb: Return Vector<PropertyKey> from…
internal_own_property_keys"
This reverts commit 5ee810f772.
This commit is contained in:
committed by
Tim Ledbetter
parent
8cd9275416
commit
2903defcfc
Notes:
github-actions[bot]
2025-05-16 05:34:06 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/2903defcfc0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4763
@@ -211,11 +211,11 @@ ThrowCompletionOr<bool> ModuleNamespaceObject::internal_delete(PropertyKey const
|
||||
}
|
||||
|
||||
// 10.4.6.11 [[OwnPropertyKeys]] ( ), https://tc39.es/ecma262/#sec-module-namespace-exotic-objects-ownpropertykeys
|
||||
ThrowCompletionOr<Vector<PropertyKey>> ModuleNamespaceObject::internal_own_property_keys() const
|
||||
ThrowCompletionOr<GC::RootVector<Value>> ModuleNamespaceObject::internal_own_property_keys() const
|
||||
{
|
||||
// 1. Let exports be O.[[Exports]].
|
||||
// NOTE: We only add the exports after we know the size of symbolKeys
|
||||
Vector<PropertyKey> exports;
|
||||
GC::RootVector<Value> exports { vm().heap() };
|
||||
|
||||
// 2. Let symbolKeys be OrdinaryOwnPropertyKeys(O).
|
||||
auto symbol_keys = MUST(Object::internal_own_property_keys());
|
||||
@@ -223,7 +223,7 @@ ThrowCompletionOr<Vector<PropertyKey>> ModuleNamespaceObject::internal_own_prope
|
||||
// 3. Return the list-concatenation of exports and symbolKeys.
|
||||
exports.ensure_capacity(m_exports.size() + symbol_keys.size());
|
||||
for (auto const& export_name : m_exports)
|
||||
exports.unchecked_append(export_name);
|
||||
exports.unchecked_append(PrimitiveString::create(vm(), export_name));
|
||||
exports.extend(symbol_keys);
|
||||
|
||||
return exports;
|
||||
|
||||
Reference in New Issue
Block a user