/* * Copyright (c) 2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::Bindings { class Wrapper : public JS::Object , public Weakable { JS_OBJECT(Wrapper, JS::Object); public: protected: explicit Wrapper(Object& prototype) : Object(prototype) { } #ifdef JS_TRACK_ZOMBIE_CELLS virtual void did_become_zombie() override { revoke_weak_ptrs(); } #endif }; }