mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-09 18:41:53 +00:00
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
.
44 lines
2 KiB
C++
44 lines
2 KiB
C++
/*
|
|
* Copyright (c) 2022, David Tuin <davidot@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibJS/Module.h>
|
|
#include <LibJS/Runtime/Completion.h>
|
|
#include <LibJS/Runtime/Object.h>
|
|
|
|
namespace JS {
|
|
|
|
class ModuleNamespaceObject final : public Object {
|
|
JS_OBJECT(ModuleNamespaceObject, Object);
|
|
GC_DECLARE_ALLOCATOR(ModuleNamespaceObject);
|
|
|
|
public:
|
|
// 10.4.6 Module Namespace Exotic Objects, https://tc39.es/ecma262/#sec-module-namespace-exotic-objects
|
|
|
|
virtual ThrowCompletionOr<Object*> internal_get_prototype_of() const override;
|
|
virtual ThrowCompletionOr<bool> internal_set_prototype_of(Object* prototype) override;
|
|
virtual ThrowCompletionOr<bool> internal_is_extensible() const override;
|
|
virtual ThrowCompletionOr<bool> internal_prevent_extensions() override;
|
|
virtual ThrowCompletionOr<Optional<PropertyDescriptor>> internal_get_own_property(PropertyKey const&) const override;
|
|
virtual ThrowCompletionOr<bool> internal_define_own_property(PropertyKey const&, PropertyDescriptor const&, Optional<PropertyDescriptor>* precomputed_get_own_property = nullptr) override;
|
|
virtual ThrowCompletionOr<bool> internal_has_property(PropertyKey const&) const override;
|
|
virtual ThrowCompletionOr<Value> internal_get(PropertyKey const&, Value receiver, CacheablePropertyMetadata* = nullptr, PropertyLookupPhase = PropertyLookupPhase::OwnProperty) const override;
|
|
virtual ThrowCompletionOr<bool> internal_set(PropertyKey const&, Value value, Value receiver, CacheablePropertyMetadata*, PropertyLookupPhase) override;
|
|
virtual ThrowCompletionOr<bool> internal_delete(PropertyKey const&) override;
|
|
virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const override;
|
|
virtual void initialize(Realm&) override;
|
|
|
|
private:
|
|
ModuleNamespaceObject(Realm&, Module* module, Vector<FlyString> exports);
|
|
|
|
virtual void visit_edges(Visitor&) override;
|
|
|
|
GC::Ptr<Module> m_module; // [[Module]]
|
|
Vector<FlyString> m_exports; // [[Exports]]
|
|
};
|
|
|
|
}
|