/* * Copyright (c) 2021, Hunter Salyer * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace HackStudio { class DebuggerGlobalJSObject final : public JS::GlobalObject , public Weakable { JS_OBJECT(DebuggerGlobalJSObject, JS::GlobalObject); public: DebuggerGlobalJSObject(); virtual JS::Value internal_get(JS::PropertyName const&, JS::Value receiver) const override; virtual bool internal_set(JS::PropertyName const&, JS::Value value, JS::Value receiver) override; Optional debugger_to_js(const Debug::DebugInfo::VariableInfo&) const; Optional js_to_debugger(JS::Value value, const Debug::DebugInfo::VariableInfo&) const; private: NonnullOwnPtrVector m_variables; }; }