/src/serenity/Userland/Libraries/LibJS/Runtime/WeakMapConstructor.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <LibJS/Runtime/NativeFunction.h> |
10 | | |
11 | | namespace JS { |
12 | | |
13 | | class WeakMapConstructor final : public NativeFunction { |
14 | | JS_OBJECT(WeakMapConstructor, NativeFunction); |
15 | | JS_DECLARE_ALLOCATOR(WeakMapConstructor); |
16 | | |
17 | | public: |
18 | | virtual void initialize(Realm&) override; |
19 | | virtual ~WeakMapConstructor() override = default; |
20 | | |
21 | | virtual ThrowCompletionOr<Value> call() override; |
22 | | virtual ThrowCompletionOr<NonnullGCPtr<Object>> construct(FunctionObject&) override; |
23 | | |
24 | | private: |
25 | | explicit WeakMapConstructor(Realm&); |
26 | | |
27 | 0 | virtual bool has_constructor() const override { return true; } |
28 | | }; |
29 | | |
30 | | } |