WeakSetConstructor.h 725 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Runtime/NativeFunction.h>
  8. namespace JS {
  9. class WeakSetConstructor final : public NativeFunction {
  10. JS_OBJECT(WeakSetConstructor, NativeFunction);
  11. JS_DECLARE_ALLOCATOR(WeakSetConstructor);
  12. public:
  13. virtual void initialize(Realm&) override;
  14. virtual ~WeakSetConstructor() override = default;
  15. virtual ThrowCompletionOr<Value> call() override;
  16. virtual ThrowCompletionOr<NonnullGCPtr<Object>> construct(FunctionObject&) override;
  17. private:
  18. explicit WeakSetConstructor(Realm&);
  19. virtual bool has_constructor() const override { return true; }
  20. };
  21. }