ladybird/Userland/DevTools/HackStudio/Debugger/DebuggerVariableJSObject.h
Lenny Maiorani 7070713ec8 DevTools: Use default constructors/destructors
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-02-16 07:33:15 -05:00

37 lines
1.1 KiB
C++

/*
* Copyright (c) 2021, Matthew Olsson <matthewcolsson@gmail.com>
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "DebuggerGlobalJSObject.h"
#include <LibDebug/DebugInfo.h>
#include <LibJS/Runtime/Completion.h>
#include <LibJS/Runtime/Object.h>
namespace HackStudio {
class DebuggerVariableJSObject final : public JS::Object {
using Base = JS::Object;
public:
static DebuggerVariableJSObject* create(DebuggerGlobalJSObject&, const Debug::DebugInfo::VariableInfo& variable_info);
DebuggerVariableJSObject(const Debug::DebugInfo::VariableInfo& variable_info, JS::Object& prototype);
virtual ~DebuggerVariableJSObject() override = default;
virtual const char* class_name() const override { return m_variable_info.type_name.characters(); }
JS::ThrowCompletionOr<bool> internal_set(JS::PropertyKey const&, JS::Value value, JS::Value receiver) override;
private:
DebuggerGlobalJSObject& debugger_object() const;
const Debug::DebugInfo::VariableInfo& m_variable_info;
};
}