/* * Copyright (c) 2021, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace JS { class WeakRefPrototype final : public PrototypeObject { JS_PROTOTYPE_OBJECT(WeakRefPrototype, WeakRef, WeakRef); GC_DECLARE_ALLOCATOR(WeakRefPrototype); public: virtual void initialize(Realm&) override; virtual ~WeakRefPrototype() override = default; private: explicit WeakRefPrototype(Realm&); JS_DECLARE_NATIVE_FUNCTION(deref); }; }